Class DefaultRequestCache

java.lang.Object
org.apache.maven.impl.cache.AbstractRequestCache
org.apache.maven.impl.cache.DefaultRequestCache
All Implemented Interfaces:
RequestCache

public class DefaultRequestCache extends AbstractRequestCache
  • Field Details

  • Constructor Details

    • DefaultRequestCache

      public DefaultRequestCache()
  • Method Details

    • doCache

      protected <REQ extends Request<?>, REP extends Result<REQ>> CachingSupplier<REQ,REP> doCache(REQ req, Function<REQ,REP> supplier)
      Description copied from class: AbstractRequestCache
      Abstract method to be implemented by subclasses to handle caching logic.

      This method is responsible for determining whether a request result should be cached, retrieving it from cache if available, or executing the supplier function if necessary.

      Specified by:
      doCache in class AbstractRequestCache
      Type Parameters:
      REQ - The request type
      REP - The response type
      Parameters:
      req - The request object
      supplier - The function that provides the response
      Returns:
      A caching supplier that handles caching logic for the request