Allow disabling symcache load via kwarg as well

account_tests
Tyler Goodlet 2023-07-20 15:27:46 -04:00
parent e88913e1f3
commit 759ebe71e9
1 changed files with 6 additions and 1 deletions

View File

@ -322,6 +322,7 @@ async def open_symcache(
reload: bool = False,
only_from_memcache: bool = False, # no API req
_no_symcache: bool = False, # no backend support
) -> SymbologyCache:
@ -337,11 +338,15 @@ async def open_symcache(
# (easily) and thus we allow for an empty instance to be loaded
# and manually filled in at the whim of the caller presuming
# the backend pkg-module is annotated appropriately.
if getattr(mod, '_no_symcache', False):
if (
getattr(mod, '_no_symcache', False)
or _no_symcache
):
yield SymbologyCache(
mod=mod,
fp=cachefile,
)
# don't do nuttin
return
# actor-level cache-cache XD