Closed agmoss closed 1 year ago
Hi there, I don't think it was the original intent of the library, but I can see that there could exist a use case for a request-scoped cache.
I am not opposed to adding the methods, if you can manage to make the typings work.
If anything, I guess the has
method is worth adding.
Hi, @Papooch thanks for this great library!
As I use this library, I find myself equating the API to that of Redis or node-lru-cache. While I know
nestjs-cls
is not a general cache solution, I can see myself benefiting from further functions typically present in a cache manager. Here are some simple examples:Many properties and methods typically found on cache strategies are not relevant (delete, clear, TTL, etc.).
I would be happy to open a PR with this functionality if you think it is an appropriate inclusion!
Cheers,
Andrew