Package org.opencms.loader.imagecache
Class CmsImageCacheAccessRenewal
java.lang.Object
org.opencms.loader.imagecache.CmsImageCacheAccessRenewal
- All Implemented Interfaces:
AutoCloseable
Evaluates successful image cache accesses and renews eligible entries asynchronously.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Shuts down the background executor.static CmsImageCacheAccessRenewalcreate(I_CmsImageCache cache, CmsImageCacheConfiguration configuration) Creates a coordinator when access-triggered renewal is enabled for the cache.voidrecordAccess(String key) Records a successful content delivery or HTTP 304 response.
-
Method Details
-
create
public static CmsImageCacheAccessRenewal create(I_CmsImageCache cache, CmsImageCacheConfiguration configuration) Creates a coordinator when access-triggered renewal is enabled for the cache.- Parameters:
cache- the configured image cacheconfiguration- the image cache configuration- Returns:
- the coordinator, or
nullwhen access renewal is disabled or unsupported
-
close
Shuts down the background executor.- Specified by:
closein interfaceAutoCloseable
-
recordAccess
Records a successful content delivery or HTTP 304 response.The method never accesses the backend and never blocks on renewal work.
- Parameters:
key- the image cache key
-