From e181b29a5e8ef52a5eda1aad95ee3b8ec9f59441 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Sat, 4 May 2024 15:30:35 -0400 Subject: [PATCH] feat: read `eager_caching` from brownie-config.yaml --- brownie/network/middlewares/caching.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/brownie/network/middlewares/caching.py b/brownie/network/middlewares/caching.py index c6cb19945..469904fa4 100644 --- a/brownie/network/middlewares/caching.py +++ b/brownie/network/middlewares/caching.py @@ -117,6 +117,9 @@ def start_block_filter_loop(self): @classmethod def get_layer(cls, w3: Web3, network_type: str) -> Optional[int]: + if CONFIG.settings['eager_caching'] is False: + # do not cache when user doesn't want it + return None if network_type != "live": # do not cache on development chains return None