Interface CachingDirectives
-
- All Known Implementing Classes:
CachingDirectives$
public interface CachingDirectives
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <K> Directive<scala.runtime.BoxedUnit>alwaysCache(Cache<K,RouteResult> cache, scala.PartialFunction<RequestContext,K> keyer)Wraps its inner Route with caching support using the givenCacheimplementation and keyer function.<K> Directive<scala.runtime.BoxedUnit>cache(Cache<K,RouteResult> cache, scala.PartialFunction<RequestContext,K> keyer)Wraps its inner Route with caching support using the givenCacheimplementation and keyer function.Directive<scala.runtime.BoxedUnit>cachingProhibited()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(akka.actor.ActorSystem s)Creates anLfuCachewith default settings obtained from the system's configuration.<K> Cache<K,RouteResult>routeCache(CachingSettings settings)Creates anLfuCache.
-
-
-
Method Detail
-
cache
<K> Directive<scala.runtime.BoxedUnit> cache(Cache<K,RouteResult> cache, scala.PartialFunction<RequestContext,K> keyer)
Wraps its inner Route with caching support using the givenCacheimplementation and keyer function.- Parameters:
cache- (undocumented)keyer- (undocumented)- Returns:
- (undocumented)
-
cachingProhibited
Directive<scala.runtime.BoxedUnit> cachingProhibited()
Passes only requests to the inner route that explicitly forbid caching with aCache-Controlheader with either ano-cacheormax-age=0setting.- Returns:
- (undocumented)
-
alwaysCache
<K> Directive<scala.runtime.BoxedUnit> alwaysCache(Cache<K,RouteResult> cache, scala.PartialFunction<RequestContext,K> keyer)
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)- Returns:
- (undocumented)
-
routeCache
<K> Cache<K,RouteResult> routeCache(akka.actor.ActorSystem s)
Creates anLfuCachewith default settings obtained from the system's configuration.- Parameters:
s- (undocumented)- Returns:
- (undocumented)
-
routeCache
<K> Cache<K,RouteResult> routeCache(CachingSettings settings)
Creates anLfuCache.- Parameters:
settings- (undocumented)- Returns:
- (undocumented)
-
-