Downstream caches should not cache package resources for a long time

Bug #1298293 reported by Michael Nelson on 2014-03-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Click Package Index
Medium
Unassigned

Bug Description

When a package resource is updated, the POST/PUT will come through our own squid cache (when bug 1297883 is implemented) so that the cache will automatically invalidate that resource. This allows us to use a large max-age and keep nearly all package resource requests away from the app servers.

But the same is not true for the browser (there are no other downstream caches as we're serving over https). For this reason, it'd be great to add a s-max-age header, also available via a setting. It's not strictly necessary, as squid can just override the max-age, but it's clearer and allows the cache settings to be in the application with squid just doing what it's told to :)

Cache-Control: max-age={{ browser_max_age }},s-max-age={{ shared_max_age }}

BTW: I think we can safely remove the expires header too?

description: updated
description: updated
James Westby (james-w) wrote :

This can also just be done in the squid config. You can tell squid to ignore cache-control
and just cache for a certain period of time for a particular url pattern. I don't know which
would be preferable to us.

Thanks,

James

On Thu, Mar 27, 2014 at 2:32 PM, James Westby <email address hidden> wrote:
> This can also just be done in the squid config. You can tell squid to ignore cache-control
> and just cache for a certain period of time for a particular url pattern. I don't know which
> would be preferable to us.

True - that would be simpler here too (even if we served over http and
had other downstream caches). Marking this bug invalid. In that case I
think we should remove any cache headers on the app response so it's
not confusing.

Thanks James.

Changed in click-package-index:
status: New → Invalid
Michael Nelson (michael.nelson) wrote :

Simplified and re-opened.

description: updated
Changed in click-package-index:
status: Invalid → New
Changed in click-package-index:
status: New → In Progress
assignee: nobody → Michael Nelson (michael.nelson)
James Tait (jamestait) on 2014-11-03
Changed in click-package-index:
status: In Progress → Triaged
James Tait (jamestait) on 2014-11-03
Changed in click-package-index:
importance: Undecided → Medium
assignee: Michael Nelson (michael.nelson) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers