|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.request.resource.caching.AbstractResourceCachingStrategy
public abstract class AbstractResourceCachingStrategy
base class for resource caching strategies
Field Summary | |
---|---|
protected static MetaDataKey<Map<ResourceReference,Time>> |
TIMESTAMP_KEY
timestamp cache stored in request cycle meta data (request-scoped) |
Constructor Summary | |
---|---|
AbstractResourceCachingStrategy()
|
Method Summary | |
---|---|
protected Time |
getLastModified(ResourceReference resourceReference)
That method gets the last modification timestamp for the specified resource reference. |
boolean |
isLastModifiedCacheEnabled()
returns if caching if lastModified timestamp lookup is enabled |
void |
setLastModifiedCacheEnabled(boolean enabled)
controls request-scoped caching of lookups to last modified time of the resource reference |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.wicket.request.resource.caching.IResourceCachingStrategy |
---|
decorateResponse, decorateUrl, undecorateUrl |
Field Detail |
---|
protected static final MetaDataKey<Map<ResourceReference,Time>> TIMESTAMP_KEY
Constructor Detail |
---|
public AbstractResourceCachingStrategy()
Method Detail |
---|
public boolean isLastModifiedCacheEnabled()
true
if enabledpublic void setLastModifiedCacheEnabled(boolean enabled)
enabled
- protected Time getLastModified(ResourceReference resourceReference)
The timestamp is cached in the meta data of the application to eliminate repeated lookups of
the same resource reference which will harm performance.
In Development mode the cache is preserved in the current RequestCycle
's meta data so
the benefit is only if the same resource is used more than once in the same page. But after
eventual modification of the resource the new modification time will be used for the next
requests.
resourceReference
- resource reference
null
if no timestamp provided
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |