[
https://issues.apache.org/jira/browse/WICKET-3846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057287#comment-13057287
]
Peter Ertl commented on WICKET-3846:
------------------------------------
I added another caching strategy so people can choose some static version
string to attach to all resource files.
For example
getResourceSettings().setCacheStrategy(new
FilenameWithFixedVersionResourceCachingStrategy("myversion123"))
will change resource
scripts.js
to
scripts-ver_myversion123.js
So you can choose to use wicket's default caching strategy based on timestamps
for development (which is convenient) and use a static version for deployment
on a cluster (which is not convenient but works).
You have to change the version string when rolling out another version of your
application.
This could either be done manually (hardcoded string) or with the help of your
build tool. For example let maven create a properties file with the current
version and read it dynamically on application startup.
> in environments without reliable timestamps (e.g. some clusters) resource
> caching is useless
> --------------------------------------------------------------------------------------------
>
> Key: WICKET-3846
> URL: https://issues.apache.org/jira/browse/WICKET-3846
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC5.1
> Reporter: Peter Ertl
> Assignee: Peter Ertl
>
> As mentioned already in the wicket userlist *iirc* wicket's default resource
> caching strategy using resource file timestamps will not work in some cluster
> environments. Cluster deployers seem to be quite dumb and not preserve the
> 'lastModified' file attribute. So depending on the server instance the
> resource is delivered from it will contain multiple timestamps for the same
> resource. Apparently timestamps seem to be unsuitable for the purpose of
> caching in that environment.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira