public class CachingResourceResolver extends AbstractResourceResolver
ResourceResolver that resolves resources from a Cache or
otherwise delegates to the resolver chain and caches the result.| Modifier and Type | Field and Description |
|---|---|
static String |
RESOLVED_RESOURCE_CACHE_KEY_PREFIX |
static String |
RESOLVED_URL_PATH_CACHE_KEY_PREFIX |
logger| Constructor and Description |
|---|
CachingResourceResolver(org.springframework.cache.Cache cache) |
CachingResourceResolver(org.springframework.cache.CacheManager cacheManager,
String cacheName) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
computeKey(org.springframework.web.server.ServerWebExchange exchange,
String requestPath) |
org.springframework.cache.Cache |
getCache()
Return the configured
Cache. |
protected reactor.core.publisher.Mono<org.springframework.core.io.Resource> |
resolveResourceInternal(org.springframework.web.server.ServerWebExchange exchange,
String requestPath,
List<? extends org.springframework.core.io.Resource> locations,
ResourceResolverChain chain) |
protected reactor.core.publisher.Mono<String> |
resolveUrlPathInternal(String resourceUrlPath,
List<? extends org.springframework.core.io.Resource> locations,
ResourceResolverChain chain) |
resolveResource, resolveUrlPathpublic static final String RESOLVED_RESOURCE_CACHE_KEY_PREFIX
public static final String RESOLVED_URL_PATH_CACHE_KEY_PREFIX
public CachingResourceResolver(org.springframework.cache.CacheManager cacheManager,
String cacheName)
public CachingResourceResolver(org.springframework.cache.Cache cache)
public org.springframework.cache.Cache getCache()
Cache.protected reactor.core.publisher.Mono<org.springframework.core.io.Resource> resolveResourceInternal(org.springframework.web.server.ServerWebExchange exchange,
String requestPath,
List<? extends org.springframework.core.io.Resource> locations,
ResourceResolverChain chain)
resolveResourceInternal in class AbstractResourceResolverprotected String computeKey(org.springframework.web.server.ServerWebExchange exchange, String requestPath)
protected reactor.core.publisher.Mono<String> resolveUrlPathInternal(String resourceUrlPath, List<? extends org.springframework.core.io.Resource> locations, ResourceResolverChain chain)
resolveUrlPathInternal in class AbstractResourceResolver