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

Support no ttl default set for volos cache #40

Open
kevinprotoss opened this issue Oct 20, 2014 · 3 comments
Open

Support no ttl default set for volos cache #40

kevinprotoss opened this issue Oct 20, 2014 · 3 comments

Comments

@kevinprotoss
Copy link

Hello,

As is known to us, redis cache is able to act as a LRU cache when no ttl is set. This means the key-value pair will be cached based on LRU strategy and they will not be invalidated even the ttl is expired.

However, the ttl of volos cache interface is set by default value 300 ms. For the memory cache, it has not such configuration for sure. Is it possible to extend volos cache for supporting this feature as well?

Bg,
Kevin

@theganyo
Copy link
Contributor

Hi Kevin. I can look into this, but have you considered just setting a high timeout?

@kevinprotoss
Copy link
Author

Yes, I have considered that. In the end, I found it's more useful if the cache can persist in the redis according to LRU. Only those which are not used recently will be deleted if the maximum memory limit has been reached.

To be simple, you can define an option of cache interface for disabling ttl, can't you

Bg,
Kevin

@theganyo
Copy link
Contributor

My concern is ensuring we can support the same semantics for TTL and size cap across all providers. That said, yes, I believe we can do this.

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

No branches or pull requests

2 participants