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
Not entirely sure if this isn't already possible, but I couldn't find out how to.
When I use a callback in the getOrElse() function to retrieve new data (and save it), I would like to be able to return the old/expired cache data (if any) whenever there was a problem fetching new data as a fallback. Something like this would be great:
cache.getOrElse(cacheKey,async(oldCache)=>{try{returnawaitfetchNewData();}catch(error){// return old cache if new data fetch failsreturnoldCache;}});
Is this possible in some other way I'm not aware of?
The text was updated successfully, but these errors were encountered:
Not entirely sure if this isn't already possible, but I couldn't find out how to.
When I use a callback in the
getOrElse()
function to retrieve new data (and save it), I would like to be able to return the old/expired cache data (if any) whenever there was a problem fetching new data as a fallback. Something like this would be great:Is this possible in some other way I'm not aware of?
The text was updated successfully, but these errors were encountered: