org.apache.wicket.request.resource.caching
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

Method Summary
 void decorateResponse(AbstractResource.ResourceResponse response, IStaticCacheableResource resource)
          decorate resource response
 void decorateUrl(ResourceUrl url, IStaticCacheableResource resource)
          add caching related information to filename + parameters
 void undecorateUrl(ResourceUrl url)
          Removes caching related information from filename + parameters.
 

Method Detail

decorateUrl

void decorateUrl(ResourceUrl url,
                 IStaticCacheableResource resource)
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 resource
resource - cacheable resource

undecorateUrl

void undecorateUrl(ResourceUrl url)
Removes caching related information from filename + parameters. In essenese this method undoes what decorateUrl(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 -


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.