Package org.craftercms.engine.cache
Class SiteCacheWarmerImpl
java.lang.Object
org.craftercms.engine.cache.SiteCacheWarmerImpl
- All Implemented Interfaces:
SiteCacheWarmer
Default implementation for
SiteCacheWarmerImpl.- Since:
- 3.1.4
- Author:
- avasquez
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.craftercms.core.service.CacheServiceprotected List<ContextCacheWarmer> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetCacheService(org.craftercms.core.service.CacheService cacheService) Sets theCacheServicevoidsetContextCacheWarmers(List<ContextCacheWarmer> contextCacheWarmers) Sets the list ofContextCacheWarmerused to perfotm the warm upvoidwarmUpCache(SiteContext siteContext, boolean switchCache) Warms up the cache for the specified site context.
-
Field Details
-
cacheService
protected org.craftercms.core.service.CacheService cacheService -
contextCacheWarmers
-
-
Constructor Details
-
SiteCacheWarmerImpl
public SiteCacheWarmerImpl()
-
-
Method Details
-
setCacheService
public void setCacheService(org.craftercms.core.service.CacheService cacheService) Sets theCacheService -
setContextCacheWarmers
Sets the list ofContextCacheWarmerused to perfotm the warm up -
warmUpCache
Warms up the cache for the specified site context. IfswitchCacheis true, then a new cache is created, warmed up and then switched with the current cache of the site.- Specified by:
warmUpCachein interfaceSiteCacheWarmer- Parameters:
siteContext- the site contextswitchCache- if a new cache should be warmed and then switched with the current cache
-