You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
For example, there is a 2-layer cache:
Layer 1 -> ttl=1d
Layer 2 -> ttl=2d
Both of them have refreshThreshold=1h
After 23h, the Layer 1 will refresh according to refreshThreshold.
However, per the current implementation, only stores.slice(0, i + 1) (only Layer 1 in this case) will be updated, while the Layer 2 still have stale data:
Is your feature request related to a problem? Please describe.
For example, there is a 2-layer cache:
Both of them have
refreshThreshold=1h
After 23h, the Layer 1 will refresh according to refreshThreshold.
However, per the current implementation, only
stores.slice(0, i + 1)
(only Layer 1 in this case) will be updated, while the Layer 2 still have stale data:cacheable/packages/cache-manager/src/index.ts
Lines 206 to 215 in 64f4341
If the Layer 1 somehow crashed between 1d and 2d, the cache will fallback to Layer 2 with stale data, which is not ideal.
Describe the solution you'd like
Provide a new option like
refreshAllStores
to update all layers on refresh.The text was updated successfully, but these errors were encountered: