Skip to content
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

NS-CACHE support Cache-Control or custom X-NooBaa-Cache-Control #6147

Open
guymguym opened this issue Aug 25, 2020 · 2 comments
Open

NS-CACHE support Cache-Control or custom X-NooBaa-Cache-Control #6147

guymguym opened this issue Aug 25, 2020 · 2 comments
Assignees
Labels
Comp-Namespace Namespace buckets related NS-CACHE Type:Enhancement New suggestions for behaviours

Comments

@guymguym
Copy link
Member

Is your feature request related to a problem? Please describe.
For caching buckets, we would like to have simple client control over caching, meaning to allow bypassing the cache, and perhaps also to fetch only from cache. See short discussion here - #6130 (comment)

Describe the solution you'd like
We should support some subset of the Cache-Control semantics of http.
We can enhance this with a custom header and query argument such as X-NooBaa-Cache-Control if the standard header is too restrictive or permissive compared to the capabilities we can provide.

Describe alternatives you've considered
NA

Additional context
Add any other context or screenshots about the feature request here.

@baum
Copy link
Contributor

baum commented Aug 3, 2021

S3 Cache-Control

NooBaa allows configuring caching TTL on a Namespace Bucket, to control how long data is cached in the NooBaa storage.

To allow controlling cache duration for individual objects HTTP Cache-Control header could be used. Cache-Control header travels in both directions. S3 client could use Cache-Control header in requests to the S3 endpoint to control cache duration for individual objects. On the other hand, the header could be sent by the S3 endpoint to help the client to determine how long to keep an object in the cache before sending another request to the S3 endpoint.

  1. Cache duration for individual objects (TTL)
  • Cache-Control: max-age=seconds
  • Expires: date
  1. Bypassing cache
  • Cache-Control: no-cache, no-store, and/or private

References

  1. HTTP Cache-Control
  2. HTTP Expires
  3. Caching in HTTP
  4. S3 Managing how long content stays in the cache (expiration)
  5. Request and Response Behavior for Amazon S3 Origins

Copy link

github-actions bot commented Sep 7, 2024

This issue had no activity for too long - it will now be labeled stale. Update it to prevent it from getting closed.

@github-actions github-actions bot added the Stale label Sep 7, 2024
@guymguym guymguym removed the Stale label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp-Namespace Namespace buckets related NS-CACHE Type:Enhancement New suggestions for behaviours
Projects
None yet
Development

No branches or pull requests

3 participants