Merge lp://staging/~jameinel/loggerhead/static_cache into lp://staging/loggerhead

Proposed by John A Meinel
Status: Merged
Approved by: Matt Nordhoff
Approved revision: 414
Merged at revision: not available
Proposed branch: lp://staging/~jameinel/loggerhead/static_cache
Merge into: lp://staging/loggerhead
Diff against target: 14 lines (+3/-1)
1 file modified
loggerhead/apps/__init__.py (+3/-1)
To merge this branch: bzr merge lp://staging/~jameinel/loggerhead/static_cache
Reviewer Review Type Date Requested Status
Matt Nordhoff Approve
Review via email: mp+24533@code.staging.launchpad.net

Description of the change

This tells loggerhead to give a Cache-Control header for static pages, indicating that they can be cached for 12 hours.

I think we could probably set this higher, and potentially should set it by configuration setting.

That way admins could set it very low just before a new rollout, and then set it very high knowing that it won't change for a while.

I did find this page:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.4

Which seemed to say that Caches should use a heuristic of "10% of the age of the file, capped at 24-hours".

I'm mostly proposing this so that we don't forget about it. We can certainly tweak the details as we desire.

To post a comment you must log in.
Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

I'll land it.

Configurability would be nice and all, but it's worth landing now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches