You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #66 but covers overall caching policies instead of details about just cargo index caching.
We need to consider what our stale-ness tolerance is, especially for the SVG badges (worst case), since I gather than plan will be running a caching CDN in-front of the service. The maximum staleness time will always be the sum of all cache TTLs.
I think ideally, it should be no longer than 1 minute from the time the live crates index is updated to the time a badge is updated.
An sample proposal:
Cargo index cache update time: 20 seconds
Crate query (from cached index) TTL: 10 seconds
SVG Max-Age / CDN TTL: 30 seconds
==================================================
Total (worst case update time): 60 seconds
The text was updated successfully, but these errors were encountered:
Thanks for the write-up! Looks like a good approach to me. I guess one minute is a good goal, because otherwise we strain the server more than necessary.
In theory, it would be nice if we could ensure that error badges are not cached, but that may be too much overhead and is not worth it with a cache time of max. 1 minute.
In theory, it would be nice if we could ensure that error badges are not cached, but that may be too much overhead and is not worth it with a cache time of max. 1 minute.
The Cache-Control header would get set by us dynamically for every response, so that shouldn't be an issue.
Related to #66 but covers overall caching policies instead of details about just cargo index caching.
We need to consider what our stale-ness tolerance is, especially for the SVG badges (worst case), since I gather than plan will be running a caching CDN in-front of the service. The maximum staleness time will always be the sum of all cache TTLs.
I think ideally, it should be no longer than 1 minute from the time the live crates index is updated to the time a badge is updated.
An sample proposal:
The text was updated successfully, but these errors were encountered: