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
When setting a custom stalePeriod on web, the cache remains valid and the browser will access data via the cache rather than sending out a fresh network request, even when the Duration specified in stalePeriod has expired.
Expected behaviour
On all platforms, after a custom stalePeriod is set, items should be removed from the cache after the specified Duration has expired.
Reproduction steps
Extend CacheManager with a Config(...stalePeriod: Duration(minutes: 1)
Make a request that uses the CacheManager
Wait over one minute
Make the same request again
Observe that the second request hits the cache, not the web.
馃悰 Bug Report
When setting a custom
stalePeriod
on web, the cache remains valid and the browser will access data via the cache rather than sending out a fresh network request, even when the Duration specified instalePeriod
has expired.Expected behaviour
On all platforms, after a custom
stalePeriod
is set, items should be removed from the cache after the specified Duration has expired.Reproduction steps
CacheManager
with aConfig(...stalePeriod: Duration(minutes: 1)
Observe that the second request hits the cache, not the web.
Configuration
Version: 3.3.0
Platform:
Cause
By default, the config for web uses the NonStoringObjectProvider. Old cache objects are removed using their provider's getOldObjects method. The implementation of this in the NonStoringObjectProvider never does anything.
Ideally, the web config should be update to use a repo that has a working implementation of
getOldObjects
.The text was updated successfully, but these errors were encountered: