Package org.craftercms.core.cache.impl
Class CacheRefresherImpl
- java.lang.Object
-
- org.craftercms.core.cache.impl.CacheRefresherImpl
-
- All Implemented Interfaces:
CacheRefresher
public class CacheRefresherImpl extends Object implements CacheRefresher
Default implementation ofCacheRefresher
.- Author:
- Sumer Jabri, Alfonso Vásquez
-
-
Constructor Summary
Constructors Constructor Description CacheRefresherImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getScopeAndKeyString(CacheItem item)
protected void
refreshItem(CacheItem item, Cache cache)
Refreshes only one item.void
refreshItems(List<CacheItem> itemsToRefresh, Cache cache)
Refreshes the specified list ofCacheItem
s.
-
-
-
Method Detail
-
refreshItems
public void refreshItems(List<CacheItem> itemsToRefresh, Cache cache)
Refreshes the specified list ofCacheItem
s.- Specified by:
refreshItems
in interfaceCacheRefresher
cache
- the cache where the new item values should be put
-
refreshItem
protected void refreshItem(CacheItem item, Cache cache) throws Exception
Refreshes only one item. To refresh the item, itsCacheLoader
is 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
-
-