public class CachingResourceTransformer extends Object implements ResourceTransformer
ResourceTransformer that
checks a Cache to see if a previously
transformed or otherwise
delegates to the resolver chain and saves the result in the cache.| Constructor and Description |
|---|
CachingResourceTransformer(org.springframework.cache.Cache cache) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.cache.Cache |
getCache()
Return the configured
Cache. |
org.springframework.core.io.Resource |
transform(HttpServletRequest request,
org.springframework.core.io.Resource resource,
ResourceTransformerChain transformerChain)
Transform the given resource.
|
public CachingResourceTransformer(org.springframework.cache.Cache cache)
public org.springframework.cache.Cache getCache()
Cache.public org.springframework.core.io.Resource transform(HttpServletRequest request, org.springframework.core.io.Resource resource, ResourceTransformerChain transformerChain) throws IOException
ResourceTransformertransform in interface ResourceTransformerrequest - the current requestresource - the resource to transformtransformerChain - the chain of remaining transformers to delegate tonullIOException - if the transformation fails