Class DefaultRequestCache
java.lang.Object
org.apache.maven.impl.cache.AbstractRequestCache
org.apache.maven.impl.cache.DefaultRequestCache
- All Implemented Interfaces:
RequestCache
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<Object, CachingSupplier<?, ?>> protected static final SessionData.Key<ConcurrentMap> protected static final Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <REQ extends Request<?>, REP extends Result<REQ>>
CachingSupplier<REQ, REP> Abstract method to be implemented by subclasses to handle caching logic.Methods inherited from class org.apache.maven.impl.cache.AbstractRequestCache
request, requests, uncheckedThrow
-
Field Details
-
KEY
-
ROOT
-
forever
-
-
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:AbstractRequestCacheAbstract 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:
doCachein classAbstractRequestCache- Type Parameters:
REQ- The request typeREP- The response type- Parameters:
req- The request objectsupplier- The function that provides the response- Returns:
- A caching supplier that handles caching logic for the request
-