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

Custom ttl for every cache record? #7

Closed
WolfDan opened this issue Sep 10, 2017 · 2 comments
Closed

Custom ttl for every cache record? #7

WolfDan opened this issue Sep 10, 2017 · 2 comments

Comments

@WolfDan
Copy link

WolfDan commented Sep 10, 2017

One of the cool features of Cachex is set a custom ttl for every set record if is required, I don't see any possible way to achieve this on nebulex, just a global one that is "gc_interval" if I'm not wrong

So... Is possible to do it with Nebulex?

Greettings

@cabol
Copy link
Owner

cabol commented Sep 10, 2017

@WolfDan of course it is possible:

MyCache.set("foo", "bar", ttl: 5)

ttl option is set in seconds

@WolfDan
Copy link
Author

WolfDan commented Sep 10, 2017

Oh nice, thank you!

@WolfDan WolfDan closed this as completed Sep 10, 2017
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