类 CachingResourceTransformer
java.lang.Object
cn.taketoday.web.resource.CachingResourceTransformer
- 所有已实现的接口:
ResourceTransformer
A
ResourceTransformer that checks a
Cache to see if a previously transformed resource
exists in the cache and returns it if found, and otherwise delegates to the resolver
chain and saves the result in the cache.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
字段 -
构造器概要
构造器构造器说明CachingResourceTransformer(cn.taketoday.cache.Cache cache) CachingResourceTransformer(cn.taketoday.cache.CacheManager cacheManager, String cacheName) -
方法概要
修饰符和类型方法说明cn.taketoday.cache.CachegetCache()Return the configuredCache.cn.taketoday.core.io.Resourcetransform(RequestContext request, cn.taketoday.core.io.Resource resource, ResourceTransformerChain transformerChain) Transform the given resource.
-
字段详细资料
-
logger
private static final cn.taketoday.logging.Logger logger -
cache
private final cn.taketoday.cache.Cache cache
-
-
构造器详细资料
-
CachingResourceTransformer
public CachingResourceTransformer(cn.taketoday.cache.Cache cache) -
CachingResourceTransformer
-
-
方法详细资料
-
getCache
public cn.taketoday.cache.Cache getCache()Return the configuredCache. -
transform
public cn.taketoday.core.io.Resource transform(RequestContext request, cn.taketoday.core.io.Resource resource, ResourceTransformerChain transformerChain) throws IOException 从接口复制的说明:ResourceTransformerTransform the given resource.- 指定者:
transform在接口中ResourceTransformer- 参数:
request- the current requestresource- the resource to transformtransformerChain- the chain of remaining transformers to delegate to- 返回:
- the transformed resource (never
null) - 抛出:
IOException- if the transformation fails
-