Class SiteCacheWarmerImpl

java.lang.Object
org.craftercms.engine.cache.SiteCacheWarmerImpl
All Implemented Interfaces:
SiteCacheWarmer

public class SiteCacheWarmerImpl extends Object implements SiteCacheWarmer
Default implementation for SiteCacheWarmerImpl.
Since:
3.1.4
Author:
avasquez
  • Field Details

    • cacheService

      protected org.craftercms.core.service.CacheService cacheService
    • contextCacheWarmers

      protected List<ContextCacheWarmer> contextCacheWarmers
  • Constructor Details

    • SiteCacheWarmerImpl

      public SiteCacheWarmerImpl()
  • Method Details

    • setCacheService

      public void setCacheService(org.craftercms.core.service.CacheService cacheService)
      Sets the CacheService
    • setContextCacheWarmers

      public void setContextCacheWarmers(List<ContextCacheWarmer> contextCacheWarmers)
      Sets the list of ContextCacheWarmer used to perfotm the warm up
    • warmUpCache

      public void warmUpCache(SiteContext siteContext, boolean switchCache)
      Warms up the cache for the specified site context. If switchCache is true, then a new cache is created, warmed up and then switched with the current cache of the site.
      Specified by:
      warmUpCache in interface SiteCacheWarmer
      Parameters:
      siteContext - the site context
      switchCache - if a new cache should be warmed and then switched with the current cache