Closed arkantos1482 closed 7 years ago
Same issue here! Thanks for bringing it up!
Here take a look I've just added two tests showing the useExpiredDataWhenNoLoaderAvailabe
behaviour.
Next time please submit a test to expose what is the problem. Otherwise, I will close the issue right away. If you don't make the effort to narrow the "problem", I won't do it for you.
It doesn't make any change in the behavior of the ReactiveCache, whether you add
useExpiredDataWhenNoLoaderAvailabe()
or not. Whenever data expires, the record will be removed from both memory and disk. (regardless of usinguseExpiredDataWhenNoLoaderAvailabe()
)The code: customerProvider = new ReactiveCache.Builder() .useExpiredDataWhenNoLoaderAvailable() .diskCacheSize(5) .using(context.getCacheDir(), new GsonSpeaker()) .provider() .lifeCache(15, TimeUnit.SECONDS) .withKey("CUSTOMER");
getCustomerApi.compose(customerProvider.readWithLoader());