Package de.hybris.platform.regioncache
Interface CacheController
- All Known Implementing Classes:
DefaultCacheController
public interface CacheController
Main point connecting platform with cache.
Implementing class is responsible for:
Implementing class is responsible for:
- Processes adding from cache.
- Processes invalidating cache units.
- Clearing cache units.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleCallback(CacheLifecycleCallback callback) registers a lifecycle callback.voidclearCache(CacheRegion region) Clears cache<T> TGets value stored in the cache.Returns all regions used in this controller.<T> TgetWithLoader(CacheKey key, CacheValueLoader<T> loader) Gets stored value from cache.voidinvalidate(CacheKey key) Performs key invalidation from cache.voidregisterTenant(String tenantId) Setups registry for tenantvoidRemoves keyvoidRemoves a registered lifecycle callback.voidsetStatsEnabled(boolean enabled) Allows to enable or disable collecting of statistics for all regions in one step.
-
Method Details
-
getWithLoader
Gets stored value from cache. If value is not available loader is invoked.- Throws:
CacheValueLoadException
-
get
Gets value stored in the cache. If value is not already loaded returns NULL. -
invalidate
Performs key invalidation from cache.
Method checks invalidation filters and cache registry. -
getRegions
Collection<CacheRegion> getRegions()Returns all regions used in this controller. -
remove
Removes key -
clearCache
Clears cache -
addLifecycleCallback
registers a lifecycle callback. Callbacks are executed in order of registration. -
removeLifecycleCallback
Removes a registered lifecycle callback. -
setStatsEnabled
void setStatsEnabled(boolean enabled) Allows to enable or disable collecting of statistics for all regions in one step. Collection of cache statistics has negative impact on cache performance. -
registerTenant
Setups registry for tenant
-