eko/gocache

Is it possible to set an option during NewLoadable or Get to ensure that when there is no value, it directly performs a synchronous set instead of an asynchronous set?

MrHuangjiacong opened this issue · 1 comments

I have a scenario where I make requests to other APIs, and I need to ensure that a particular API is only executed once and its result is saved, especially in high-concurrency situations. Therefore, I require a real-time set operation.

eko commented

Hi,

This issue has been solved by using the singleflight Go tool here: #243

Closing this issue for now but feel free to reopen if any issue remains.

Thank you