You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library uses memoizee to cache function calls in various places, such as in src/router.ts, where TVL and route resolution are cached. While caching makes sense in many scenarios, it would be useful to allow users to either configure or clear the cache based on their needs.
Context: I'm working on an arbitrage bot that leverages the library, and there are times when I need the freshest data. For instance, if I know a transaction has unbalanced a pool, I need to bypass the cache and get the latest data.
Another use case is during my integration tests, where I'm replaying swap transactions from older blocks using Anvil/Hardhat block resets. Since routes are cached for 5 minutes, the same resolution is returned for a given token swap, even though I'm working with completely different blocks between tests. Ideally, I'd like to wipe or ignore the cache in this testing environment.
The text was updated successfully, but these errors were encountered:
The library uses memoizee to cache function calls in various places, such as in src/router.ts, where TVL and route resolution are cached. While caching makes sense in many scenarios, it would be useful to allow users to either configure or clear the cache based on their needs.
Context: I'm working on an arbitrage bot that leverages the library, and there are times when I need the freshest data. For instance, if I know a transaction has unbalanced a pool, I need to bypass the cache and get the latest data.
Another use case is during my integration tests, where I'm replaying swap transactions from older blocks using Anvil/Hardhat block resets. Since routes are cached for 5 minutes, the same resolution is returned for a given token swap, even though I'm working with completely different blocks between tests. Ideally, I'd like to wipe or ignore the cache in this testing environment.
The text was updated successfully, but these errors were encountered: