Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Replacing stale content #154

Open
nikdo opened this issue Dec 26, 2018 · 2 comments
Open

Replacing stale content #154

nikdo opened this issue Dec 26, 2018 · 2 comments

Comments

@nikdo
Copy link

nikdo commented Dec 26, 2018

I am using cacache with make-fetch-happen to cache fetch responses from a forecast API. These responses are pretty big (~60 kB) and differ every hour.

What worries me a little bit is the fact that stale responses are kept by default. I expected the stale response to be replaced by the fresh one if the key matches.

I've investigated the documentation thoroughly and the closest thing I've found is calling rm.content just before putting new one.

Is this the right thing to do?
Have I overlooked something?
What is the reason for keeping stale responses by default?
Is purging stale responses out of the scope of this library?
If this is generally accepted cache behavior, can you please point me to some explanation?

Thank you.

@ohenepee
Copy link

I'm facing a similar issue, isn't there any form of expiration or something similar in this library?

@nikdo
Copy link
Author

nikdo commented May 31, 2019

I don't think so. I settled up with deleting cache manually using cron.

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