public class CachingResourceResolver extends AbstractResourceResolver
ResourceResolver
that
resolves resources from a Cache
or otherwise
delegates to the resolver chain and saves the result in the cache.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(Cache cache) |
CachingResourceResolver(CacheManager cacheManager,
String cacheName) |
Modifier and Type | Method and Description |
---|---|
Cache |
getCache()
Return the configured
Cache . |
protected Resource |
resolveResourceInternal(HttpServletRequest request,
String requestPath,
List<? extends Resource> locations,
ResourceResolverChain chain) |
protected String |
resolveUrlPathInternal(String resourceUrlPath,
List<? extends Resource> locations,
ResourceResolverChain chain) |
resolveResource, resolveUrlPath
public static final String RESOLVED_RESOURCE_CACHE_KEY_PREFIX
public static final String RESOLVED_URL_PATH_CACHE_KEY_PREFIX
public CachingResourceResolver(CacheManager cacheManager, String cacheName)
public CachingResourceResolver(Cache cache)
public Cache getCache()
Cache
.protected Resource resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
resolveResourceInternal
in class AbstractResourceResolver
protected String resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
resolveUrlPathInternal
in class AbstractResourceResolver