muesli / cache2go

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

Proposal: implement a function that returns a cache retrieval function with a specific type #70

Open Gao-Vidor opened 4 months ago

Gao-Vidor commented 4 months ago

I would like to submit a suggestion on GitHub's issues. The suggestion is as follows: It would be beneficial to implement a function that returns a cache retrieval function with a specific type, rather than directly returning an interface{}. This approach would enhance type safety and usability. Could you please consider implementing this feature in future versions?