@Component(value="blMultitTenantCatalogCacheExtensionHandler") public class MultiTenantCatalogCacheExtensionHandler extends com.broadleafcommerce.enterprise.common.extension.enterprise.catalog.AbstractCatalogCacheServiceExtensionHandler implements AssignedCatalogStateChangeListener
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
alternateCacheFetch
The default fetch behavior is to fetch a catalog product or category once per site, even if that product or category
are the same across multiple sites.
|
protected int |
catalogRequestCacheMaxCount |
protected com.broadleafcommerce.enterprise.common.extension.enterprise.catalog.CatalogCacheServiceExtensionManager |
extensionManager |
protected Map<String,CacheKeyMaps> |
keysByCache |
protected static org.apache.commons.logging.Log |
LOG |
static int |
STATE_CHANGE_LISTENER_ORDER |
| Constructor and Description |
|---|
MultiTenantCatalogCacheExtensionHandler() |
| Modifier and Type | Method and Description |
|---|---|
org.broadleafcommerce.common.extension.ExtensionResultStatusType |
addEntityToCache(Object entity,
String basicCacheKey,
javax.cache.Cache cache) |
protected String |
buildCatalogCacheKey(Long catalog,
String basicCacheKey) |
protected String |
buildSiteCacheKey(Long site,
String basicCacheKey) |
int |
getAssignedCatalogStateChangeListenerOrder() |
org.broadleafcommerce.common.extension.ExtensionResultStatusType |
getEntityFromCache(String basicCacheKey,
javax.cache.Cache cache,
org.broadleafcommerce.common.extension.ExtensionResultHolder result) |
void |
init() |
void |
notifyAssignedCatalogStateChange(org.broadleafcommerce.common.site.domain.SiteCatalogXref xref) |
org.broadleafcommerce.common.extension.ExtensionResultStatusType |
removeEntityFromCache(String basicCacheKey,
Object entity,
javax.cache.Cache cache) |
getPriority, isEnabled, setEnabled, setPriorityprotected static final org.apache.commons.logging.Log LOG
public static final int STATE_CHANGE_LISTENER_ORDER
@Value(value="${catalog.requesturi.cache.max.count:25000}")
protected int catalogRequestCacheMaxCount
protected com.broadleafcommerce.enterprise.common.extension.enterprise.catalog.CatalogCacheServiceExtensionManager extensionManager
@Value(value="${catalog.requesturi.cache.alternative.fetch:false}")
protected boolean alternateCacheFetch
protected Map<String,CacheKeyMaps> keysByCache
public MultiTenantCatalogCacheExtensionHandler()
@PostConstruct public void init()
public org.broadleafcommerce.common.extension.ExtensionResultStatusType addEntityToCache(Object entity, String basicCacheKey, javax.cache.Cache cache)
addEntityToCache in interface com.broadleafcommerce.enterprise.common.extension.enterprise.catalog.CatalogCacheServiceExtensionHandleraddEntityToCache in class com.broadleafcommerce.enterprise.common.extension.enterprise.catalog.AbstractCatalogCacheServiceExtensionHandlerpublic org.broadleafcommerce.common.extension.ExtensionResultStatusType getEntityFromCache(String basicCacheKey, javax.cache.Cache cache, org.broadleafcommerce.common.extension.ExtensionResultHolder result)
getEntityFromCache in interface com.broadleafcommerce.enterprise.common.extension.enterprise.catalog.CatalogCacheServiceExtensionHandlergetEntityFromCache in class com.broadleafcommerce.enterprise.common.extension.enterprise.catalog.AbstractCatalogCacheServiceExtensionHandlerpublic org.broadleafcommerce.common.extension.ExtensionResultStatusType removeEntityFromCache(String basicCacheKey, Object entity, javax.cache.Cache cache)
removeEntityFromCache in interface com.broadleafcommerce.enterprise.common.extension.enterprise.catalog.CatalogCacheServiceExtensionHandlerremoveEntityFromCache in class com.broadleafcommerce.enterprise.common.extension.enterprise.catalog.AbstractCatalogCacheServiceExtensionHandlerpublic void notifyAssignedCatalogStateChange(org.broadleafcommerce.common.site.domain.SiteCatalogXref xref)
notifyAssignedCatalogStateChange in interface AssignedCatalogStateChangeListenerpublic int getAssignedCatalogStateChangeListenerOrder()
getAssignedCatalogStateChangeListenerOrder in interface AssignedCatalogStateChangeListenerCopyright © 2020. All rights reserved.