Closed yiting1122 closed 3 years ago
User may not set the reloader, i think use a flag is better way, when user set refreshAfterWrite the flag is true. of course, if user not set the refreshAfterWrite i think must return nil
loader
is different to reloader
. The former is required for a LoadingCache but not in a normal Cache. The latter is optional and only for LoadingCache, along with loader
when applications want their own reloading strategy.
if the reloader is not set , when the key expired, return the old value or return nil and delete the old value i think it must return nil.
I believe a LoadingCache would never return nil (empty value). It should either return old value or blocking to get new value.
because this is a loading cache ,c.loader is can not be nil. Thanks