public class CachingResourceTransformer extends Object implements ResourceTransformer
ResourceTransformer that checks a Cache to see if a
previously transformed resource exists in the cache and returns it if found,
or otherwise delegates to the resolver chain and caches the result.| Constructor and Description |
|---|
CachingResourceTransformer(org.springframework.cache.Cache cache) |
CachingResourceTransformer(org.springframework.cache.CacheManager cacheManager,
String cacheName) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.cache.Cache |
getCache()
Return the configured
Cache. |
reactor.core.publisher.Mono<org.springframework.core.io.Resource> |
transform(org.springframework.web.server.ServerWebExchange exchange,
org.springframework.core.io.Resource resource,
ResourceTransformerChain transformerChain)
Transform the given resource.
|
public CachingResourceTransformer(org.springframework.cache.Cache cache)
public CachingResourceTransformer(org.springframework.cache.CacheManager cacheManager,
String cacheName)
public org.springframework.cache.Cache getCache()
Cache.public reactor.core.publisher.Mono<org.springframework.core.io.Resource> transform(org.springframework.web.server.ServerWebExchange exchange,
org.springframework.core.io.Resource resource,
ResourceTransformerChain transformerChain)
ResourceTransformertransform in interface ResourceTransformerexchange - the current exchangeresource - the resource to transformtransformerChain - the chain of remaining transformers to delegate to