Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci committed Sep 29, 2023
1 parent 2d39eeb commit becd23c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/middlewares/methods/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ impl MiddlewareBuilder<RpcMethod, CallRequest, CallResult> for CacheMiddleware {
};

let ttl_seconds = match method.cache {
Some(CacheParams { ttl_seconds, .. }) => ttl_seconds,
Some(CacheParams { ttl_seconds, .. }) => {
ttl_seconds.or(cache_ext.config.default_ttl_seconds)
}
None => cache_ext.config.default_ttl_seconds,
};

Expand Down

0 comments on commit becd23c

Please sign in to comment.