mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 23:55:01 +01:00
Cache SwapResponse, MeltBolt11Response and MintBolt11Response (#361)
* added cache to mint state and post request wrapper macro. --------- Co-authored-by: thesimplekid <tsk@thesimplekid.com>
This commit is contained in:
@@ -84,10 +84,17 @@ pub async fn start_mint(
|
||||
supported_units,
|
||||
)
|
||||
.await?;
|
||||
let cache_time_to_live = 3600;
|
||||
let cache_time_to_idle = 3600;
|
||||
|
||||
let mint_arc = Arc::new(mint);
|
||||
|
||||
let v1_service = cdk_axum::create_mint_router(Arc::clone(&mint_arc)).await?;
|
||||
let v1_service = cdk_axum::create_mint_router(
|
||||
Arc::clone(&mint_arc),
|
||||
cache_time_to_live,
|
||||
cache_time_to_idle,
|
||||
)
|
||||
.await?;
|
||||
|
||||
let mint_service = Router::new()
|
||||
.merge(v1_service)
|
||||
|
||||
Reference in New Issue
Block a user