Page MenuHomePhabricator

GitBlit main page sets Cache-Control: no-cache
Closed, DeclinedPublic


We should leverage browser caching and a reverse proxy to make GitBlit responsive. It currently marks all responses as no-cache, which is too aggressive.

$ curl -I ""
HTTP/1.1 200 OK
Date: Sun, 09 Jun 2013 22:45:31 GMT
Server: Jetty(7.6.8.v20121106)
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate
Content-Length: 1966389
Vary: Accept-Encoding

Version: wmf-deployment
Severity: normal
See Also:



Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:04 AM
bzimport added projects: Gerrit, Upstream.
bzimport set Reference to bz49371.
bzimport added a subscriber: Unknown Object (MLST).
ori created this task.Jun 9 2013, 10:46 PM
demon added a comment.Jun 9 2013, 11:05 PM

We are currently running it behind Apache as a reverse proxy. I'm fine with trying to improve caching here. If swapping Apache for $somethingElse is necessary, I'm fine with that too.

Change 75366 had a related patch set uploaded by Demon:
Allow the user's browser to cache resources

Change 75366 merged by Ryan Lane:
Allow the user's browser to cache resources

This is now deployed with a default expiry of 5 minutes. Look good to you Ori?

ori added a comment.Aug 14 2013, 9:08 AM

5 minutes seems too short -- it should be a week or more for some static assets -- and I don't think "Cache-Control: private, must-revalidate" is appropriate for an unauthenticated, read-only view of Git data.

demon added a comment.Aug 14 2013, 4:34 PM

5 minutes was mostly for testing. That being said, I think this setting affects too many things and not just resources. Maybe we need to hack it a bit.

demon removed a subscriber: demon.Dec 8 2014, 6:33 PM
demon closed this task as Declined.Aug 27 2015, 7:13 AM
demon claimed this task.
Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptAug 27 2015, 7:13 AM