ResourceResolver that resolves resources from a Cache or
otherwise delegates to the resolver chain and caches the result.
| Modifier and Type | Field and Description |
|---|---|
| private final Cache | |
| private final List | |
| public static final String | RESOLVED_RESOURCE_CACHE_KEY_PREFIX
The prefix used for resolved resource cache keys. |
| public static final String | RESOLVED_URL_PATH_CACHE_KEY_PREFIX
The prefix used for resolved URL path cache keys. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String | |
| public Cache | |
| private String | |
| public List | |
| protected Mono | resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
Implements abstract org.
|
| protected Mono | resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
Implements abstract org.
|
| public void | setContentCodings(List<String>
one or more supported content codings codings)Configure the supported content codings from the "Accept-Encoding" header for which to cache resource variations. |
| cache | back to summary |
|---|---|
| private final Cache cache | |
| contentCodings | back to summary |
|---|---|
| private final List<String> contentCodings | |
| RESOLVED_RESOURCE_CACHE_KEY_PREFIX | back to summary |
|---|---|
| public static final String RESOLVED_RESOURCE_CACHE_KEY_PREFIX The prefix used for resolved resource cache keys. | |
| RESOLVED_URL_PATH_CACHE_KEY_PREFIX | back to summary |
|---|---|
| public static final String RESOLVED_URL_PATH_CACHE_KEY_PREFIX The prefix used for resolved URL path cache keys. | |
| CachingResourceResolver | back to summary |
|---|---|
| public CachingResourceResolver(Cache cache) | |
| CachingResourceResolver | back to summary |
|---|---|
| public CachingResourceResolver(CacheManager cacheManager, String cacheName) | |
| computeKey | back to summary |
|---|---|
| protected String computeKey(ServerWebExchange exchange, String requestPath) | |
| getCache | back to summary |
|---|---|
| public Cache getCache() Return the configured | |
| getContentCodingKey | back to summary |
|---|---|
private String getContentCodingKey(ServerWebExchange exchange)
| |
| getContentCodings | back to summary |
|---|---|
| public List Return a read-only list with the supported content codings.
| |
| resolveResourceInternal | back to summary |
|---|---|
| protected Mono Implements abstract org.
| |
| resolveUrlPathInternal | back to summary |
|---|---|
| protected Mono Implements abstract org.
| |
| setContentCodings | back to summary |
|---|---|
| public void setContentCodings(List<String> codings) 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 By default this property is set to ["br", "gzip"] based on
the value of | |