Skip to content

Commit

Permalink
feat: read eager_caching from brownie-config.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored May 4, 2024
1 parent 71e6e2e commit e181b29
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions brownie/network/middlewares/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e181b29

Please sign in to comment.