refactor: replace ipfs TimeSizedCache with Moka#4542
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the cached crate with moka for caching IPFS app data in the orderbook, which simplifies the code by removing explicit Mutex locking. It also updates a test assertion in the balance overrides crate. The review feedback suggests using moka::future::Cache instead of moka::sync::Cache to perform non-blocking operations in an asynchronous context.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| let _timer = self.metrics.fetches.start_timer(); | ||
| let result = self.fetch_raw(contract_app_data).await; |
There was a problem hiding this comment.
the previous scope was only measuring the fetch_raw, now the timer is measuring up to the return
Description
Replace the existing mutex IPFS cache with Moka.
Changes
Mutex<TimedSizedCache<AppDataHash, Option<String>>>withmoka::future::Cache<AppDataHash, Option<String>>How to test
cargo nextest run