eko / gocache

☔️ A complete Go cache library that brings you multiple ways of managing your caches
https://vincent.composieux.fr/article/i-wrote-gocache-a-complete-and-extensible-go-cache-library/
MIT License
2.4k stars 193 forks source link

feat(lib/cache): loadable add synchronous write option #237

Closed MrHuangjiacong closed 4 months ago

MrHuangjiacong commented 6 months ago

Dear author, hello, when I use "loadable" in some high-concurrency scenarios, and the keys are the same, loadFunc will be requested multiple times. I hope to add an input parameter of options to achieve synchronized set. operation, so I submitted this PR

shotmk commented 4 months ago

Very good and anticipated improvement for the loadable cache. Can this be merged ?

UPD: after lookin closely on the PR, i do not understand it, and found another PR opened for same issue, that seems to be easier and more straightforward: https://github.com/eko/gocache/pull/243

eko commented 4 months ago

Hi,

Closing this pull request as I think https://github.com/eko/gocache/pull/243 will fix this issue as well.

Please feel free to reopen if does not.