Skip to content

Behaviour when expireAfterCreate returns 0 #803

Answered by ben-manes
mkurz asked this question in Q&A
Discussion options

You must be logged in to vote

I believe it is (1), where the entry is added but immediately expirable so that the next read/write will have a miss. That's the most straightforward code as (2) might require special conditionals, etc. to ensure it was interpreted correctly. A get is a computation and expiration is calculated after the value was obtained, so all of the expensive work was performed and therefore (2) probably wouldn't provide any benefit?

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@mkurz
Comment options

@ben-manes
Comment options

@mkurz
Comment options

@ben-manes
Comment options

@mkurz
Comment options

Answer selected by mkurz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants