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
Modifier and TypeFieldDescriptionprotected org.craftercms.core.service.CacheService
protected List<ContextCacheWarmer>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 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 ofContextCacheWarmer
used to perfotm the warm up -
warmUpCache
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
-