Class CachingResourceTransformer
java.lang.Object
org.springframework.web.reactive.resource.CachingResourceTransformer
- All Implemented Interfaces:
- ResourceTransformer
A 
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.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructorsConstructorDescriptionCachingResourceTransformer(Cache cache) CachingResourceTransformer(CacheManager cacheManager, String cacheName) 
- 
Method SummaryModifier and TypeMethodDescriptiongetCache()Return the configuredCache.reactor.core.publisher.Mono<Resource>transform(ServerWebExchange exchange, Resource resource, ResourceTransformerChain transformerChain) Transform the given resource.
- 
Constructor Details- 
CachingResourceTransformer
- 
CachingResourceTransformer
 
- 
- 
Method Details- 
getCacheReturn the configuredCache.
- 
transformpublic reactor.core.publisher.Mono<Resource> transform(ServerWebExchange exchange, Resource resource, ResourceTransformerChain transformerChain) Description copied from interface:ResourceTransformerTransform the given resource.- Specified by:
- transformin interface- ResourceTransformer
- Parameters:
- exchange- the current exchange
- resource- the resource to transform
- transformerChain- the chain of remaining transformers to delegate to
- Returns:
- the transformed resource (never empty)
 
 
-