Every time a new value is fetched this method will be called. When the
passed value will expire the implementation must invoke the provided
flushCb
.
Remember that:
value
object, never the current one. Thus will prevent inconsistent behaviour
with values fetched from persistence.When a value is flushed by other means this method will be called. This
call allow implementation to perform cleanup like clearTimeout or similar.
The value
object will be the same that was passed to the fetched
method.
When a value is fetched from persistence it may be already expired. This
method is called after a value is read to check this condition. If this
method return resolve to true the fetched
method will be called.
Generated using TypeDoc
Defines an object, providing a single method that will provide the logic to autoflush fetched values.