Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

support If-None-Match or/and If-modified-since #234

Open
jahead opened this issue Feb 23, 2021 · 2 comments
Open

support If-None-Match or/and If-modified-since #234

jahead opened this issue Feb 23, 2021 · 2 comments

Comments

@jahead
Copy link
Contributor

jahead commented Feb 23, 2021

Hey,

was wondering if it is possible, to use what we have to implement a pass-though cache, that can inject the If-None-Match from etag or if-modified-since into the request header?

Basically the idea would be to have.

1st request -> response -> store cache + (etag|mtime) -> 2nd request -> inject If-None-Match|if-modified-since into cache -> if response is 304 Not Modified serve cache if not serve from cache

@jahead
Copy link
Contributor Author

jahead commented Feb 23, 2021

I was looking at how it could be modified to include this functionality, I was thinking it could be pretty simple.

We would need yet another flag :(, but we would just have to teach the request function in getting the etag | mtime out of the serialized config in the store, injecting it into http request headers, and having the response function read from the cache store if it gets a 304 Not Modified from the server

@rsadr0pyz
Copy link

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

No branches or pull requests

2 participants