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

Implement 304 response to If-Modified-Since header #28

Open
flipmcf opened this issue Sep 15, 2022 · 0 comments
Open

Implement 304 response to If-Modified-Since header #28

flipmcf opened this issue Sep 15, 2022 · 0 comments

Comments

@flipmcf
Copy link
Owner

flipmcf commented Sep 15, 2022

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since

When a requests for a playlist or segment includes the "If-Modified-Since" header, and that video is still cached in casterpak, reply with a 304 and update CaterPak's TTL int the cache database.

This is basically a signal that the video is still being accessed by viewers and should remain in the cache.

If the file is not cached, reply with a 200 and the payload (playlist or segment) as normal.

Upstream caches, such as a CDN, should use this If-Modified-Since request header to signal to CasterPak that a video is still being played and should remain in CasterPak's cache, but the requests are being handled by upstream caches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant