Package org.craftercms.core.cache.impl
Class CacheRefresherImpl
java.lang.Object
org.craftercms.core.cache.impl.CacheRefresherImpl
- All Implemented Interfaces:
CacheRefresher
Default implementation of
CacheRefresher.- Author:
- Sumer Jabri, Alfonso Vásquez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected voidrefreshItem(CacheItem item, Cache cache) Refreshes only one item.voidrefreshItems(List<CacheItem> itemsToRefresh, Cache cache) Refreshes the specified list ofCacheItems.
-
Constructor Details
-
CacheRefresherImpl
public CacheRefresherImpl()
-
-
Method Details
-
refreshItems
Refreshes the specified list ofCacheItems.- Specified by:
refreshItemsin interfaceCacheRefreshercache- the cache where the new item values should be put
-
refreshItem
Refreshes only one item. To refresh the item, itsCacheLoaderis called to get a new value of the item. If the value returned by the loader is null, the item is removed from the cache instead.- Throws:
Exception
-
getScopeAndKeyString
-