File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed
async_substrate_interface Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1182,7 +1182,7 @@ async def init_runtime(
11821182 else :
11831183 return await self .get_runtime_for_version (runtime_version , block_hash )
11841184
1185- @cached_fetcher (max_size = 16 , cache_key_index = 0 )
1185+ @cached_fetcher (max_size = SUBSTRATE_RUNTIME_CACHE_SIZE , cache_key_index = 0 )
11861186 async def get_runtime_for_version (
11871187 self , runtime_version : int , block_hash : Optional [str ] = None
11881188 ) -> Runtime :
Original file line number Diff line number Diff line change @@ -818,6 +818,7 @@ def init_runtime(
818818 self .runtime = runtime
819819 return self .runtime
820820
821+ @functools .lru_cache (maxsize = SUBSTRATE_RUNTIME_CACHE_SIZE )
821822 def get_runtime_for_version (
822823 self , runtime_version : int , block_hash : Optional [str ] = None
823824 ) -> Runtime :
Original file line number Diff line number Diff line change @@ -219,6 +219,7 @@ def __init__(
219219 """
220220 self ._inflight : dict [Hashable , asyncio .Future ] = {}
221221 self ._method = method
222+ self ._max_size = max_size
222223 self ._cache = LRUCache (max_size = max_size )
223224 self ._cache_key_index = cache_key_index
224225
You can’t perform that action at this time.
0 commit comments