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
There are multiple caching strategies we can try. I'd propose we start with the simplest, which could look like this:
You get the modification date of the underlying s3 file
Make sure you send that date in a Last-Modified header
You may also get a if-modified-since header. If so, compare and:
Last-Modified > if-modified-since - exit with 304 status code without doing anything else.
Last-Modified <= if-modified-since - Continue with the queries as usual
Notes:
If you send Last-Modified you should get back if-modified-since in the follow up requests. Otherwise it may not be present.
The actual storage in this case happens in browsers.
Browsers have mechanisms to clear the cache or to bypass it by force reloading (like Cmd+Shift+R on Mac)
If this is not good enough (if the file modification timestamp is not the only variable we need to account for) we can switch to ETag caching which is very similar
There are multiple caching strategies we can try. I'd propose we start with the simplest, which could look like this:
Last-Modified
headerif-modified-since
header. If so, compare and:Last-Modified > if-modified-since
- exit with 304 status code without doing anything else.Last-Modified <= if-modified-since
- Continue with the queries as usualNotes:
ETag
caching which is very similarThe text was updated successfully, but these errors were encountered: