Mint: allow caching with external Redis service #478

Closed
opened 2024-11-27 16:20:49 +00:00 by callebtc · 3 comments
callebtc commented 2024-11-27 16:20:49 +00:00 (Migrated from github.com)

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).

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 2024-11-27 16:33:31 +00:00 (Migrated from github.com)

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

A setup that set memory as default for cashing requests/ response, But allow mint to setup their own external Redis caching service
thesimplekid commented 2024-11-27 17:18:24 +00:00 (Migrated from github.com)

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.

I think this is a good idea and something that can be supported fairly easier by changing the [cache](https://github.com/cashubtc/cdk/blob/af2fe580f49203d69fd390a7a017815fea78166e/crates/cdk-axum/src/lib.rs#L53) to be a `Cache` trait instead of a specific struct like we do for the database within the mint.
crodas commented 2024-11-29 13:27:25 +00:00 (Migrated from github.com)

@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

@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
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk#478
No description provided.