سؤال

I can't find any traces of etags support in Wicket. There is a way to use etags with it?

هل كانت مفيدة؟

المحلول

No, there's no ETag support. Wicket is not made to serve static content. If you have to serve many static resource you can use another framework like Spring MVC in addition to Wicket.

Wicket supports caching via a strong caching mechanism. Resources are mounted to URLs which contain the timestamp of the file (in development mode) or a MD5 hash (in deployment mode). This makes resources unique and they can be cached forever, because if the content changes, the URL also changes. The Expires header is automatically set by Wicket to one year from the current date. This makes the use of a weak hashing mechanism like ETag unnecessary for such resources.

You can change this behavior by setting an IResourceCachingStrategy in IResourceSettings.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top