Class CacheRefresherImpl

java.lang.Object
org.craftercms.core.cache.impl.CacheRefresherImpl
All Implemented Interfaces:
CacheRefresher

public class CacheRefresherImpl extends Object implements CacheRefresher
Default implementation of CacheRefresher.
Author:
Sumer Jabri, Alfonso Vásquez
  • Constructor Details

    • CacheRefresherImpl

      public CacheRefresherImpl()
  • Method Details

    • refreshItems

      public void refreshItems(List<CacheItem> itemsToRefresh, Cache cache)
      Refreshes the specified list of CacheItems.
      Specified by:
      refreshItems in interface CacheRefresher
      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, its CacheLoader 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
    • getScopeAndKeyString

      protected String getScopeAndKeyString(CacheItem item)