类 CachingResourceResolver
java.lang.Object
cn.taketoday.web.resource.AbstractResourceResolver
cn.taketoday.web.resource.CachingResourceResolver
- 所有已实现的接口:
ResourceResolver
A
ResourceResolver that
resolves resources from a Cache or otherwise
delegates to the resolver chain and saves the result in the cache.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Brian Clozel
-
字段概要
字段修饰符和类型字段说明private final cn.taketoday.cache.Cachestatic final StringThe prefix used for resolved resource cache keys.static final StringThe prefix used for resolved URL path cache keys.从类继承的字段 cn.taketoday.web.resource.AbstractResourceResolver
logger -
构造器概要
构造器构造器说明CachingResourceResolver(cn.taketoday.cache.Cache cache) CachingResourceResolver(cn.taketoday.cache.CacheManager cacheManager, String cacheName) -
方法概要
修饰符和类型方法说明protected StringcomputeKey(RequestContext request, String requestPath) cn.taketoday.cache.CachegetCache()Return the configuredCache.private StringgetContentCodingKey(RequestContext request) Return a read-only list with the supported content codings.protected cn.taketoday.core.io.ResourceresolveResourceInternal(RequestContext request, String requestPath, List<? extends cn.taketoday.core.io.Resource> locations, ResourceResolvingChain chain) protected StringresolveUrlPathInternal(String resourceUrlPath, List<? extends cn.taketoday.core.io.Resource> locations, ResourceResolvingChain chain) voidsetContentCodings(List<String> codings) Configure the supported content codings from the "Accept-Encoding" header for which to cache resource variations.从类继承的方法 cn.taketoday.web.resource.AbstractResourceResolver
resolveResource, resolveUrlPath
-
字段详细资料
-
构造器详细资料
-
CachingResourceResolver
public CachingResourceResolver(cn.taketoday.cache.Cache cache) -
CachingResourceResolver
-
-
方法详细资料
-
getCache
public cn.taketoday.cache.Cache getCache()Return the configuredCache. -
setContentCodings
Configure the supported content codings from the "Accept-Encoding" header for which to cache resource variations.The codings configured here are generally expected to match those configured on
EncodedResourceResolver.setContentCodings(List).By default this property is set to ["br", "gzip"] based on the value of
EncodedResourceResolver.DEFAULT_CODINGS.- 参数:
codings- one or more supported content codings
-
getContentCodings
Return a read-only list with the supported content codings. -
resolveResourceInternal
protected cn.taketoday.core.io.Resource resolveResourceInternal(@Nullable RequestContext request, String requestPath, List<? extends cn.taketoday.core.io.Resource> locations, ResourceResolvingChain chain) -
computeKey
-
getContentCodingKey
-
resolveUrlPathInternal
protected String resolveUrlPathInternal(String resourceUrlPath, List<? extends cn.taketoday.core.io.Resource> locations, ResourceResolvingChain chain)
-