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
I want to add a route that can be used to delete a cache entry, so that next time that specific cache route is called it will re-fetch the content.
However, it doesnt really work:
I call the route /get/foo that is cached for 1h
I delete the entry /get/foo: cache.del('/get/foo'). The callback return value says 1: OK
I call the route /get/foo again, strangely the response code is 304 even though I deleted the cache entry
I call the route /get/foo again, and again and again and it is always status 304
If I try to delete again the cache entry with cache.del('/get/foo') it returns 0, event though I called that same endpoint multiple times after deleting the entry
If I do cache.get((err, entries) => console.log(entries)) at that moment, it shows no entry
It seems after you delete an entry once, it just never shows again? we can never delete it again? or is it not how to delete entries manually?
The text was updated successfully, but these errors were encountered:
304 means the content has not been modified, your issue is most likely not related to this library but to either a CDN in front of your origin, or the browser cache behavior, look into your http cache-control handling and into any CDN setup in front of your origin servers
I believe postman would respect browser cache behavior 🤔
I can confirm after checking, currently working on this code base, that this library does not modify the status code response in any way, I might miss something but look into any middleware you have.
Can you share the request/response headers (before and after cache hit) ?
I want to add a route that can be used to delete a cache entry, so that next time that specific cache route is called it will re-fetch the content.
However, it doesnt really work:
/get/foo
that iscached
for 1h/get/foo
:cache.del('/get/foo')
. The callback return value says1
: OK/get/foo
again, strangely the response code is304
even though I deleted the cache entry/get/foo
again, and again and again and it is always status304
cache.del('/get/foo')
it returns 0, event though I called that same endpoint multiple times after deleting the entrycache.get((err, entries) => console.log(entries))
at that moment, it shows no entryIt seems after you delete an entry once, it just never shows again? we can never delete it again? or is it not how to delete entries manually?
The text was updated successfully, but these errors were encountered: