Class DefaultCmsCacheService
- java.lang.Object
-
- de.hybris.platform.acceleratorcms.component.cache.impl.DefaultCmsCacheService
-
- All Implemented Interfaces:
CmsCacheService
public class DefaultCmsCacheService extends java.lang.Object implements CmsCacheService
Default implementation ofCmsCacheService
-
-
Constructor Summary
Constructors Constructor Description DefaultCmsCacheService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringget(CacheKey key)Gets cache content by keyprotected CacheControllergetCacheController()protected java.util.Map<java.lang.String,CmsCacheKeyProvider<? extends AbstractCMSComponentModel>>getCacheKeyProviders()protected ConfigurationServicegetConfigurationService()CacheKeygetKey(javax.servlet.http.HttpServletRequest request, AbstractCMSComponentModel component)Gets the cache key for the current component and requestprotected com.google.common.base.Supplier<java.lang.Boolean>getUseCache()protected booleanisPreviewOrLiveEditEnabled(javax.servlet.http.HttpServletRequest request)voidput(CacheKey key, java.lang.String content)Stores cache content by keyvoidsetCacheController(CacheController cacheController)voidsetCacheKeyProviders(java.util.Map<java.lang.String,CmsCacheKeyProvider<? extends AbstractCMSComponentModel>> cacheKeyProviders)voidsetConfigurationService(ConfigurationService configurationService)booleanuseCache(javax.servlet.http.HttpServletRequest request, AbstractCMSComponentModel component)Checks if cache is enabledprotected booleanuseCacheInternal()
-
-
-
Method Detail
-
getKey
public CacheKey getKey(javax.servlet.http.HttpServletRequest request, AbstractCMSComponentModel component)
Description copied from interface:CmsCacheServiceGets the cache key for the current component and request- Specified by:
getKeyin interfaceCmsCacheService- Parameters:
request- the current requestcomponent- the current component- Returns:
- the cache key
-
get
public java.lang.String get(CacheKey key)
Description copied from interface:CmsCacheServiceGets cache content by key- Specified by:
getin interfaceCmsCacheService- Parameters:
key- the cache key- Returns:
- the cache content
-
put
public void put(CacheKey key, java.lang.String content)
Description copied from interface:CmsCacheServiceStores cache content by key- Specified by:
putin interfaceCmsCacheService- Parameters:
key- the cache keycontent- the cache content
-
useCache
public boolean useCache(javax.servlet.http.HttpServletRequest request, AbstractCMSComponentModel component)Description copied from interface:CmsCacheServiceChecks if cache is enabled- Specified by:
useCachein interfaceCmsCacheService- Parameters:
request- the current requestcomponent- the current component- Returns:
- true if cache is enabled
-
getUseCache
protected com.google.common.base.Supplier<java.lang.Boolean> getUseCache()
-
useCacheInternal
protected boolean useCacheInternal()
-
getCacheKeyProviders
protected java.util.Map<java.lang.String,CmsCacheKeyProvider<? extends AbstractCMSComponentModel>> getCacheKeyProviders()
-
setCacheKeyProviders
public void setCacheKeyProviders(java.util.Map<java.lang.String,CmsCacheKeyProvider<? extends AbstractCMSComponentModel>> cacheKeyProviders)
-
getConfigurationService
protected ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
getCacheController
protected CacheController getCacheController()
-
setCacheController
public void setCacheController(CacheController cacheController)
-
isPreviewOrLiveEditEnabled
protected boolean isPreviewOrLiveEditEnabled(javax.servlet.http.HttpServletRequest request)
-
-