-
Hi, when "putting" an element in the cache and/but having
Asking because we do have a special case where we sometimes need to rely such behaviour. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
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 |
Beta Was this translation helpful? Give feedback.
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?