We found a strange issue today where the value argument of the callback to Policy.get was returning an object that still contained the item, ttl, stored, and ttl. Below is (hopefully) all of the relevant code.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
We found a strange issue today where the
value
argument of the callback toPolicy.get
was returning an object that still contained theitem
,ttl
,stored
, andttl
. Below is (hopefully) all of the relevant code.Cache initialization:
The caching implementation used is as follows, where the
cache
variable is thedataCache
from just above:Here is the object we were storing on the last line above:
The second argument of
Policy.get
that is documented as being the value was returning the object below:Any thoughts as to why the observed behavior is not the documented (or at least as I understand it) behavior?