Skip to content

v5.4.0

Compare
Choose a tag to compare
@jaredwray jaredwray released this 19 Jan 22:17

Refresh cache keys in background

Both the caching and multicaching modules support a mechanism to refresh expiring cache keys in background when using the wrap function.
This is done by adding a refreshThreshold attribute while creating the caching store or passing it to the wrap function.

If refreshThreshold is set and after retrieving a value from cache the TTL will be checked.
If the remaining TTL is less than refreshThreshold, the system will update the value asynchronously,
following same rules as standard fetching. In the meantime, the system will return the old value until expiration.

What's Changed

Full Changelog: v5.3.2...v5.4.0