-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review cache headers served by render servers #959
Comments
Because we know when low zoom tiles will be next rerendered, we should override z0-12 to be a couple hours after the weekly rerender completes. |
|
Unfortunately mod_tile doesn't provide a way to set a fixed expiry and as it also doesn't set the |
Last-Modified is probably the first thing to get working, so we need mod_tile changes. |
It appears that I can't think of any reason not to re-enable these two lines: Of course, it will only provide useful information for storage backends which support it. |
We want to review the cache related headers served by the render servers to make sure we're getting the best out of our frontend caches.
Currently the only such headers mod_tile adds are
Expires
andCache-Control: max-age
both of which report the same expiry time though in different way.The core of it's algorithm is to take the current age of the tile and multiple that by
ModTileCacheLastModifiedFactor
which we have configured as0.2
currently, so a tile that is five days old will have an expiry of one day and a tile that is thirty days old will have an expiry of six days.It does also clamp the expiry to be no more that
ModTileCacheDurationMax
which is seven days in our configuration, and clamps the minimum expiry in three buckets:ModTileCacheDurationLowZoom
which is 6 days for us and covers zoom 0 to 9ModTileCacheDurationMediumZoom
which is 1 day for us and covers zoom 10 to 13ModTileCacheDurationMinimum
which is 3 hours for us and covers zoom 14 to 19Some random jitter (up to 3 hours) is also added.
Tiles which are known to be dirty when served are given a randomised expiry up to
ModTileCacheDurationDirty
which we have as 15 minutes.The text was updated successfully, but these errors were encountered: