-
Notifications
You must be signed in to change notification settings - Fork 4
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
Set HTTP cache-control headers #26
Comments
For reference, since this was already brought up: https://github.com/protocol/bifrost-infra/issues/2758#issuecomment-1716761794 @aschmahmann Do you have thoughts on whether the cache header configuration belongs in the someguy, boxo (routing server), or the proxy? I saw that for IPNS we set the cache header based on the TTL in the IPNS record. Though for peer and provider records, it seems like this might be something we want in someguy based on the source, e.g. for cid.contact longer than DHT records which are inherently more ephemeral. |
Notes from Helia WG meeting (11.1.2024): Reasons to have different cache headers for empty responses (no providers) and responses with recordsFor example, when a CID is advertsied, but someguy has yet to get results for, if it's cached for too long, it won't be retrievable in that time frame for which the empty response is cached. Therefore, we should have a lower cache Some initial numbers to start withresponse with provider/peer records: 5m |
Implementing this in someguy requires delaying sending HTTP headers until we have at least one result. Right now, HTTP headers are set before results can be inspected, these are the places where we would add cache-control based on having at least one result:
|
See ipfs/boxo#584 |
I believe this was closed in ipfs/boxo#584 and ipfs/specs#466 |
Currently, someguy does not have a local cache. As a temporary measure we could introduce cache-control HTTP headers and store the results on the reverse proxy.
Is this a reasonable strategy and if so, what is the reasonable time to cache the results? 5 minutes? 1 hour?
The text was updated successfully, but these errors were encountered: