goburrow / cache

Mango Cache 🥭 - Partial implementation of Guava Cache in Go (golang).
BSD 3-Clause "New" or "Revised" License
574 stars 48 forks source link

Cache refresh to happen asynchronously #13

Closed sanketpayghan-zz closed 4 years ago

sanketpayghan-zz commented 5 years ago

Currently if we set refreshAfterWrite time duration and key is accessed after that time refresh of cache happens in sync.

In case loader function is latent that particular call will be latent so need to have async refresh. Get will return old value and asynchronously refresh value to new.

sanketpayghan-zz commented 5 years ago

Here is PR - https://github.com/goburrow/cache/pull/15 @davecheney @nqv

cy490761462 commented 4 years ago

I think this feature is also required by our project. Is there any progress for this PR? @davecheney @nqv

majintao commented 4 years ago

no any process 。。。

nqv commented 4 years ago

I believe this is fixed in https://github.com/goburrow/cache/commit/ed586e32006b30416a68137394a5f27d374c6eb0