Class CmsImageCacheAccessRenewal

java.lang.Object
org.opencms.loader.imagecache.CmsImageCacheAccessRenewal
All Implemented Interfaces:
AutoCloseable

public final class CmsImageCacheAccessRenewal extends Object implements AutoCloseable
Evaluates successful image cache accesses and renews eligible entries asynchronously.

  • Method Details

    • create

      Creates a coordinator when access-triggered renewal is enabled for the cache.

      Parameters:
      cache - the configured image cache
      configuration - the image cache configuration
      Returns:
      the coordinator, or null when access renewal is disabled or unsupported
    • close

      public void close()
      Shuts down the background executor.
      Specified by:
      close in interface AutoCloseable
    • recordAccess

      public void recordAccess(String key)
      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