muesli / cache2go

Concurrency-safe Go caching library with expiration capabilities and access counters
Other
2.11k stars 518 forks source link

How about start a channel to exec callback #25

Closed aireet closed 5 years ago

aireet commented 5 years ago

Thanks for your open source.

if the CacheTabls's items becomes very long and the 'expirationCheck' is runing with lots of callback function waiting to execute, it will lock the table for so many time. so I think it' better to make a channle to exec the callback function.

muesli commented 5 years ago

If you have a specific implementation in mind, please feel free to open a new pull request.