jellydator / ttlcache

An in-memory cache with item expiration and generics
MIT License
930 stars 116 forks source link

Add MGet or Multiple Get to improve read performance #92

Open Planxnx opened 1 year ago

Planxnx commented 1 year ago

I've performance issues when my cache has heavy read and write load in the same time. I propose an approch like Reduce mutex blocking while get from multiple keys (like redis MGET ) Or use RW.Mutex while Get() instead.

gozeloglu commented 1 year ago

Hey @swithek. What about this issue? Should it be added as a new feature? If yes, I'd like to work on it.

swithek commented 1 year ago

@gozeloglu I'm not sure it's possible to implement the suggested changes, at least not all of them. I go into more detail here: https://github.com/jellydator/ttlcache/discussions/105#discussioncomment-5999701