cashubtc / cdk

Cashu Development Kit
MIT License
88 stars 45 forks source link

Mint: allow caching with external Redis service #478

Open callebtc opened 6 days ago

callebtc commented 6 days ago

Currently, cached request/response pairs are written to memory (https://github.com/cashubtc/cdk/pull/361). It would be great if the mint could use a dedicated Redis caching service for this (as well or instead of RAM caching).

mubarak23 commented 6 days ago

A setup that set memory as default for cashing requests/ response, But allow mint to setup their own external Redis caching service

thesimplekid commented 6 days ago

I think this is a good idea and something that can be supported fairly easier by changing the cache to be a Cache trait instead of a specific struct like we do for the database within the mint.

crodas commented 4 days ago

@thesimplekid I'm working on this, upcoming PR. My approach is to always have an in memory cache and use redis to synchronize cache between nodes /cc @callebtc