Package org.craftercms.engine.cache
Class SiteCacheWarmerImpl
- java.lang.Object
-
- org.craftercms.engine.cache.SiteCacheWarmerImpl
-
- All Implemented Interfaces:
SiteCacheWarmer
public class SiteCacheWarmerImpl extends Object implements SiteCacheWarmer
Default implementation forSiteCacheWarmerImpl
.- Since:
- 3.1.4
- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description protected org.craftercms.core.service.CacheService
cacheService
protected List<ContextCacheWarmer>
contextCacheWarmers
-
Constructor Summary
Constructors Constructor Description SiteCacheWarmerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setCacheService(org.craftercms.core.service.CacheService cacheService)
Sets theCacheService
void
setContextCacheWarmers(List<ContextCacheWarmer> contextCacheWarmers)
Sets the list ofContextCacheWarmer
used to perfotm the warm upvoid
warmUpCache(SiteContext siteContext, boolean switchCache)
Warms up the cache for the specified site context.
-
-
-
Field Detail
-
cacheService
protected org.craftercms.core.service.CacheService cacheService
-
contextCacheWarmers
protected List<ContextCacheWarmer> contextCacheWarmers
-
-
Method Detail
-
setCacheService
public void setCacheService(org.craftercms.core.service.CacheService cacheService)
Sets theCacheService
-
setContextCacheWarmers
public void setContextCacheWarmers(List<ContextCacheWarmer> contextCacheWarmers)
Sets the list ofContextCacheWarmer
used to perfotm the warm up
-
warmUpCache
public void warmUpCache(SiteContext siteContext, boolean switchCache)
Warms up the cache for the specified site context. IfswitchCache
is true, then a new cache is created, warmed up and then switched with the current cache of the site.- Specified by:
warmUpCache
in interfaceSiteCacheWarmer
- Parameters:
siteContext
- the site contextswitchCache
- if a new cache should be warmed and then switched with the current cache
-
-