goburrow / cache

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

the refresh need return the err #26

Closed yiting1122 closed 3 years ago

yiting1122 commented 3 years ago

image

nqv commented 3 years ago

What do you need error returned for? I believe Refresh is mainly for reloading asynchronously so it shouldn't return error.

yiting1122 commented 3 years ago

OK, if go c.load(k) ,it may cause error, but i do not know.

nqv commented 3 years ago

Do you mean calling c.load(k) in a go routine? I think the current behavior match LoadingCache#refresh