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

Using MemCache as TTL but not disk cache #299

Closed
icedice opened this issue Nov 12, 2020 · 2 comments
Closed

Using MemCache as TTL but not disk cache #299

icedice opened this issue Nov 12, 2020 · 2 comments

Comments

@icedice
Copy link

icedice commented Nov 12, 2020

I want to serve the data from the cache without even hitting the backend if it is somewhat fresh. I see two possible way os doing this:

  1. Check when item was added to memory cache and serve if fresh. I do however not see anyway of checking when item was added to the cache

  2. Use mem cache in TTL mode with short time span. This way I could just serve the item form cache if present. But I don't see any way of putting memory cache into TTL mode without the disk cache doing the same which I do not want.

What am I missing here?


I just noticed that I am able to set TTL on the mem cache like this: memoryCache.setTtl(true) but that the method is deprecated.

@garrettmoon
Copy link
Collaborator

Can you explain what use case you need to support where the diskCache being in TTL mode is at odds with your goals?

@icedice
Copy link
Author

icedice commented May 23, 2021

I honestly do not remember, it was a long time ago but I guess my goal was saving bandwith...

@icedice icedice closed this as completed May 23, 2021
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

2 participants