why doesnot item.Get() execute item.Do() when cacheMiss?
JellyZhang opened this issue · 3 comments
JellyZhang commented
In my point of view, item.Do()
returns the up-to-date value of item everytime when it is called.
so I think maybe we can get the up-to-date value whenitem.Get()
miss cache , and put it into redis/lru with expiration time of TTL.
vmihailenco commented
There is no such thing as item.Get
. But Cache.Once
works in a similar way.
JellyZhang commented
There is no such thing as
item.Get
. ButCache.Once
works in a similar way.
yeap, my mistake, I meant Cache.Get()
.
So why does not Cache.Get
refresh the value of item using item.Do
?
vmihailenco commented
@JellyZhang I think you are mistaken - the API looks/works differently.