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

Add support for expire after types: on-write, on-access #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dferstay
Copy link

This commit allows caches to be configured with an ExpireAfterType that
controls how entries are expired from the cache; two types are supported.

  • ExpireAfterWrite specifies that each entry should be automatically
    removed from the cache once a fixed duration has elapsed after the
    entry's creation, or the most recent replacement of its value.
  • ExpireAfterAccess specifies that each entry should be automatically
    removed from the cache once a fixed duration has elapsed after the
    entry's creation, the most recent replacement of its value, or its last
    access.

ExpireAfterType defaults to ExpireAfterWrite for backwards-compatibility.

Signed-off-by: Daniel Ferstay [email protected]

This commit allows caches to be configured with an ExpireAfterType that
controls how entries are expired from the cache; two types are supported.

* ExpireAfterWrite specifies that each entry should be automatically
  removed from the cache once a fixed duration has elapsed after the
  entry's creation, or the most recent replacement of its value.
* ExpireAfterAccess specifies that each entry should be automatically
  removed from the cache once a fixed duration has elapsed after the
  entry's creation, the most recent replacement of its value, or its last
  access.

ExpireAfterType defaults to ExpireAfterWrite for backwards-compatibility.

Signed-off-by: Daniel Ferstay <[email protected]>
@dferstay
Copy link
Author

dferstay commented May 15, 2020

@calvinfo , @danielstjules , @rbranson , would you be able to take a look at this when you get a chance? :)

Cheers,
-Daniel

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

Successfully merging this pull request may close these issues.

1 participant