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

Expiry after Access / Time to Idle #39

Open
cruftex opened this Issue Feb 17, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@cruftex
Member

cruftex commented Feb 17, 2016

Expiry after an entry is accessed. This is (should be) primarily intended for freeing resources if not used, while expiry after modification is an optimization versus business decision (how old is okay?).

For efficiency reasons I intend to do it not 100% on time but with a defined maximum lag.

expiryAfterAccessDuration

Time an entry expires after an access. By default there is lag of 10%, which means the actual expiry might be later then specified. Example: Configured value is 1h, the item may stay in the cache and keep visible for a maximum of 1 hour and 6 minutes after an access.

expiryAfterAccessLag

Configure a different lag time. The minimum lag time is 1 minute.

@cruftex cruftex added the feature label Feb 17, 2016

@cruftex cruftex added this to the v1 milestone Feb 17, 2016

@cruftex cruftex referenced this issue Feb 17, 2016

Closed

Expiry Listener #38

@cruftex cruftex changed the title from Expiry after Access to Expiry after Access / Time to Ilde Mar 29, 2016

@cruftex cruftex modified the milestones: v1.2, v1 May 18, 2016

@cruftex cruftex removed this from the v1.2 milestone Jul 3, 2018

@ricardojlrufino

This comment has been minimized.

ricardojlrufino commented Aug 16, 2018

What status of this implementation?
The main feature I needed was this ...

@quaff

This comment has been minimized.

quaff commented Aug 17, 2018

Ilde in title should be idle

@cruftex cruftex changed the title from Expiry after Access / Time to Ilde to Expiry after Access / Time to Idle Aug 17, 2018

@cruftex

This comment has been minimized.

Member

cruftex commented Aug 17, 2018

@quaff Oops, thanks, I changed the title!

@cruftex

This comment has been minimized.

Member

cruftex commented Aug 17, 2018

@ricardojlrufino Thanks for reaching out! Its good timing, since I have now stabilized the next version (1.2) and need to do some planing what important stuff to put the focus on next.

Two reasons it's not there yet: We rarely need it, there needs to be always a compromise on the performance we have achieved to provide/enable this feature.

To drive it in the right direction, I'd love to hear from people who actually need it. Can you share something about the scenario you want to use it for?

@ricardojlrufino

This comment has been minimized.

ricardojlrufino commented Aug 19, 2018

@cruftex My application is from IoT and I cache the Devices in use and, after a while, I need to remove it from memory.
I ended up using the Guava library, unfortunately it is very large (2MB), and I only use it for cache.

Ref: https://github.com/google/guava/wiki/CachesExplained

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