[Tile-serving] [openstreetmap/mod_tile] Dirty tiles cached for 7 days (Issue #441)
Norbert Renner
notifications at github.com
Tue Jun 11 10:24:28 UTC 2024
*See also [operations#1096](https://github.com/openstreetmap/operations/issues/1096) for examples and trying to infer from indirect hints.*
>From just looking at the code¹, I guess `state` in `add_expiry` is actually `tileVeryOld`² and not `tileOld` for dirty tiles:
https://github.com/openstreetmap/mod_tile/blob/1f81434203d4f6977f8458a7ea42f31523cfa0e0/src/mod_tile.c#L526-L527
Determined in `tile_state`:
https://github.com/openstreetmap/mod_tile/blob/1f81434203d4f6977f8458a7ea42f31523cfa0e0/src/mod_tile.c#L442-L448
Assuming the default³ of 1 year for `scfg->veryold_threshold`, 20-year-old expired tiles will be older and therefore `tileVeryOld`.
So, dirty tiles would not get a low maxAge as originally intended. Instead, maxAge would be derived from modified time (-20 years) and clamped to `ModTileCacheDurationMax`, resulting in a `Cache-Control: max-age=604800`.
¹ not entirely sure if this is the code actually used for OSMF render servers and in what version; permalinks for current master
² `tileVeryOld` [was introduced](https://github.com/openstreetmap/mod_tile/commit/1b4c56d8eda631179b5d03e8472e981425eb1a5f#diff-531f2ce0748b97527d6baf14e5c0dec0db585fbf1bf9eec14511a34eaf797575L359-R371) 11 years ago, apperently without adjusting the `add_expiry` code
³ [searching](https://github.com/search?q=repo%3Aopenstreetmap%2Fchef%20ModTileVeryOldThreshold&type=code) for `ModTileVeryOldThreshold` in chef does not find any overriding config, default should be one year:
- https://github.com/openstreetmap/mod_tile/blob/1f81434203d4f6977f8458a7ea42f31523cfa0e0/includes/render_config.h#L47-L49
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/441
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/mod_tile/issues/441 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20240611/b59ed871/attachment.htm>
More information about the Tile-serving
mailing list