Module org.apache.wicket.core
Interface IResourceCachingStrategy
- All Known Implementing Classes:
FilenameWithVersionResourceCachingStrategy
,NoOpResourceCachingStrategy
,QueryStringWithVersionResourceCachingStrategy
public interface IResourceCachingStrategy
caching strategy for cacheable resources
it can add and remove caching information to the filename and query
string parameters of the requested resource to control caches in the
browser and on the internet. It also can set http response caching headers.
- Since:
- 1.5
- Author:
- Peter Ertl
-
Field Summary
Modifier and TypeFieldDescriptionstatic final MetaDataKey<String>
A key used to store the extracted resource's version in undecorateUrl(ResourceUrl) into the request cycle -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears any stateful informationvoid
decorateResponse
(AbstractResource.ResourceResponse response, IStaticCacheableResource resource) decorate resource responsevoid
decorateUrl
(ResourceUrl url, IStaticCacheableResource resource) add caching related information to filename + parametersvoid
undecorateUrl
(ResourceUrl url) Removes caching related information from filename + parameters.
-
Field Details
-
URL_VERSION
A key used to store the extracted resource's version in undecorateUrl(ResourceUrl) into the request cycle
-
-
Method Details
-
decorateUrl
add caching related information to filename + parameters- Parameters:
url
- parameters to which caching information should be added and which will be used to construct the url to the resourceresource
- cacheable resource
-
undecorateUrl
Removes caching related information from filename + parameters. In essenese this method undoes whatdecorateUrl(ResourceUrl, IStaticCacheableResource)
did.- Parameters:
url
- parameters that were used to construct the url to the resource and from which previously added caching information should be stripped
-
decorateResponse
void decorateResponse(AbstractResource.ResourceResponse response, IStaticCacheableResource resource) decorate resource response- Parameters:
response
-
-
clearCache
void clearCache()Clears any stateful information
-