load static resources from the path dedicated to a specific version.

This "/static/VERSION/abc/def.ghi" path is interpreted by stapler to be
  the same thing as "/abc/def.ghi", but this avoids the stale cache
  problem when the user upgrades to new Hudson. Stapler also sets a long
  future expiration dates for such static resources.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4099 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-08-05 16:18:19 +00:00
1 parent 78b3966824
commit 7392db40e7
6 files changed
+56 -16

No files matched your search

@@ -108,6 +108,11 @@ public class WebAppMain implements ServletContextListener {
Hudson.VERSION = ver;
context.setAttribute("version",ver);
if(ver.equals("?"))
Hudson.RESOURCE_PATH = "";
else
Hudson.RESOURCE_PATH = "/static/"+Util.getDigestOf(ver).substring(0,8);
Trigger.init(); // start running trigger
// trigger the loading of changelogs in the background,