You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. $ curl -I "https://git.wikimedia.org/"
What is the expected output? What do you see instead?
It'd be nice if Gitblit would allow the browser to cache some of the output for awhile
rather than re-sending it. Don't want to cache for too long, but some period of time
would be nice. Right now we issue "Pragma: no-cache"
/ "Cache-Control: no-cache, max-age=0, must-revalidate"
What version of the product are you using? On what operating system?
1.3.1-SNAPSHOT, Ubuntu 12.04.2 LTS
Please provide any additional information below.
Downstream bug: https://bugzilla.wikimedia.org/49371
Reported by chorohoe@wikimedia.org on 2013-07-17 23:26:35
Hi Chad,
The good news.
I went ahead and implemented some page caching and this is immediately available on
master. By default it is disabled.
You can enable it by setting web.pageCacheExpires=5 for a 5 minute expiration; all
expirations are in minutes, not seconds or msecs. The algorithm uses a last-modified
date of the resource relevant to the page request.
Cache-Control: private, must-revalidate
Last-Modified: based on requested resource, minimum of Gitblit boot date
Expires: now + expires_setting
The bad news.
This works great for Firefox and IE BUT Chrome/Webkit _always_ requests a new page
from the server instead of using the cache and I can not figure out why. Since you
guys are web page experts maybe you can tell me what is wrong. :) Maybe it is a bug
in Chrome. Maybe it's a bug in Gitblit. Either way this is either an improvement
or at least not a regression.
Feedback requested.
Ok. I lied. Chrome is fulfilling from the cache as long as the url is NOT localhost.
Weird. Ok, I think everyone is happy now. Give it a go and let me know how this
works for you.
Re-opened for discussion with Wikimedia folks on how to improve caching since the current
strategy is not ideal for their setup:
https://bugzilla.wikimedia.org/show_bug.cgi?id=49371
At Wikimedia, I think what we might want to do is to set far future-expires on all Gitblit
pages, and to write a Gerrit plug-in that runs whenever a patch is merged and that
purges from the cache (Varnish, in our case) any views that need to be updated in light
of that merge. Does that seem viable? Is the set of URLs that need to be purged finite
and small?
Reported by olivneh@wikimedia.org on 2014-02-16 02:38:12
Activity
gitblit commentedon Aug 12, 2015
Reported by
James.Mogeron 2013-07-17 23:32:42gitblit commentedon Aug 12, 2015
Reported by
chorohoe@wikimedia.orgon 2013-07-17 23:34:42gitblit commentedon Aug 12, 2015
Reported by
James.Mogeron 2013-07-19 15:24:33gitblit commentedon Aug 12, 2015
Reported by
James.Mogeron 2013-07-19 15:28:09gitblit commentedon Aug 12, 2015
Reported by
James.Mogeron 2013-07-24 19:56:32gitblit commentedon Aug 12, 2015
Reported by
James.Mogeron 2013-07-24 19:57:04Fixedgitblit commentedon Aug 12, 2015
Reported by
James.Mogeron 2013-08-19 11:48:26gitblit commentedon Aug 12, 2015
Reported by
James.Mogeron 2013-08-19 11:50:02Acceptedgitblit commentedon Aug 12, 2015
Reported by
olivneh@wikimedia.orgon 2014-02-16 02:38:12gitblit commentedon Aug 12, 2015
Reported by
James.Mogeron 2014-02-16 21:11:16