Usage of backend agnostic cache engine
angelhodar opened this issue · 1 comments
Hey! I was just watching for some package to cache some query responses and before reaching your repo I was thinking about using some standalone key-value storage agnostic package. I found keyv and unstorage to be very easy to setup and they support multiple adapters out of the box, and keyv already has ttl support (havent checked unstorage). I see in the code that you created your own cache engine interface, so maybe its useful for you to let one of this packages to handle that for you! I suppose that you already studied it before creating this package but just in case.
Hello @angelhodar,
Yep I want to have as less dependencies as possible when it comes to implementation of the package itself, and it was quite easy to implement.
But let me know if you miss any specific implementation
I decided to skip cache in FS and other DBs because it feels weird to use mongodb and store cache in sql dbs)
And I went with two options only:
- Redis (distributed): you can use same cache across multiple instances/pods
- In Memory (local): will be 5x faster then FS on average (if the ram is not a concern)