Class CachingDirectives$
java.lang.Object
org.apache.pekko.http.javadsl.server.directives.CachingDirectives$
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final CachingDirectives$Static reference to the singleton instance of this Scala object.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<K> RouteAdapteralwaysCache(Cache<K, RouteResult> cache, scala.PartialFunction<RequestContext, K> keyer, Supplier<Route> inner) Wraps its inner Route with caching support using the givenCacheimplementation and keyer function.<K> RouteAdaptercache(Cache<K, RouteResult> cache, scala.PartialFunction<RequestContext, K> keyer, Supplier<Route> inner) Wraps its inner Route with caching support using the givenpekko.http.caching.scaladsl.Cacheimplementation and keyer function.cachingProhibited(Supplier<Route> inner) Passes only requests to the inner route that explicitly forbid caching with aCache-Controlheader with either ano-cacheormax-age=0setting.<K> Cache<K,RouteResult> routeCache(CachingSettings settings) Creates anLfuCache
- 
Field Details- 
MODULE$Static reference to the singleton instance of this Scala object.
 
- 
- 
Constructor Details- 
CachingDirectives$public CachingDirectives$()
 
- 
- 
Method Details- 
cachepublic <K> RouteAdapter cache(Cache<K, RouteResult> cache, scala.PartialFunction<RequestContext, K> keyer, Supplier<Route> inner) Wraps its inner Route with caching support using the givenpekko.http.caching.scaladsl.Cacheimplementation and keyer function.Use pekko.japi.JavaPartialFunctionto build thekeyer.- Parameters:
- cache- (undocumented)
- keyer- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
cachingProhibitedPasses only requests to the inner route that explicitly forbid caching with aCache-Controlheader with either ano-cacheormax-age=0setting.- Parameters:
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
alwaysCachepublic <K> RouteAdapter alwaysCache(Cache<K, RouteResult> cache, scala.PartialFunction<RequestContext, K> keyer, Supplier<Route> inner) Wraps its inner Route with caching support using the givenCacheimplementation and keyer function. Note that routes producing streaming responses cannot be wrapped with this directive.- Parameters:
- cache- (undocumented)
- keyer- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
routeCacheCreates anLfuCacheDefault settings are available via pekko.http.caching.javadsl.CachingSettings.create.- Parameters:
- settings- (undocumented)
- Returns:
- (undocumented)
 
 
-