Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

In custom use cases you can enable or disable caching for a WebResponse with:

Code Block
org.apache.wicket.request.http.WebResponse#enableCaching(Duration duration, WebResponse.CacheScope scope)

But you must also override this method of WebPage (at least in Wicket 1.5.4), per bug https://issues.apache.org/jira/browse/WICKET-4357:

Code Block

protected @Override void setHeaders( org.apache.wicket.request.http.WebResponse response )
 {} // do nothing

Or, you can disable caching with:and

Code Block
org.apache.wicket.request.http.WebResponse#disableCaching()

...

Package resources are now fully cacheable for one year (maximum value recommended in RFC-2616). Since the resource urls contain a fingerprint in the filename that changes when the related resource data changes there will be no stale cache hits. So you get best network performance and reliable, instant cache invalidation.

for more details see https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-inIResourceSettingsmethodsetAddLastModifiedTimeToResourceReferenceUrl%28%29hasbeenreplacedbyIResourceCachingStrategyImage Removed for details...