object CachingDirectives
- Annotations
- @ApiMayChange()
- Source
- CachingDirectives.scala
- Alphabetic
- By Inheritance
- CachingDirectives
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def alwaysCache[K](cache: Cache[K, RouteResult], keyer: PartialFunction[RequestContext, K], inner: Supplier[Route]): RouteAdapter
Wraps its inner Route with caching support using the given Cache implementation and keyer function.
Wraps its inner Route with caching support using the given Cache implementation and keyer function. Note that routes producing streaming responses cannot be wrapped with this directive.
- def cache[K](cache: Cache[K, RouteResult], keyer: PartialFunction[RequestContext, K], inner: Supplier[Route]): RouteAdapter
Wraps its inner Route with caching support using the given pekko.http.caching.scaladsl.Cache implementation and keyer function.
Wraps its inner Route with caching support using the given pekko.http.caching.scaladsl.Cache implementation and keyer function.
Use pekko.japi.JavaPartialFunction to build the
keyer
. - def cachingProhibited(inner: Supplier[Route]): RouteAdapter
Passes only requests to the inner route that explicitly forbid caching with a
Cache-Control
header with either ano-cache
ormax-age=0
setting. - def routeCache[K](settings: CachingSettings): Cache[K, RouteResult]
Creates an LfuCache
Creates an LfuCache
Default settings are available via pekko.http.caching.javadsl.CachingSettings.create.