Hi Wicketeers, Is it possible to take CACHING TIME for resources from some settings ?
Now, this time is hardcoded in WebResource#setHeaders(...) method to 1 hour value. I know, wicket is great for creating complex dynamic applications, but I there is often no need to reload the CSS and javascript files so often. It is not problem to override this method in subclasses and use own value, but when I have done it, I can tell, that it is a too much effort of subclassing, because many important wicket components are subclasses of the WebResource class and even more components work with these subclasses which must be changed too, so there is whole dependency tree, which has to be changed, because of caching only one generic setting value. For example - if somebody want to have all javascripts and css files cached for a time of 1 week, because they are not changed and there is no need to download them more often, it is needed to create custom subclasses for: RESOURCES - custom PackageResource (which extends WebResource) - then dependent JavascriptPackageResource, - dependent CompressedPackageResource RESOURCE REFERENCES - then custom ResourceReference (which will work new custom PackageResource) - then dependent JavascriptResourceReference - dependent CompressedResourceReference ... I think, it would be very good to separate this as general setting for caching resources in some wicket settings, where it can be overriden without so much subclassing effort, which bubble up the hierarchy now. Stefan -- View this message in context: http://www.nabble.com/Caching-time-of-resources---could-it-be-as-general-setting---tp16992127p16992127.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
