Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 5d9183a

Browse files
committed
return default func if cache not set
1 parent db204f6 commit 5d9183a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

gapic/utils/cache.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ def wrapper(self, *, collisions, **kwargs):
8686

8787
context_cache = _get_cache()
8888
if context_cache is None:
89-
raise RuntimeError(
90-
f"Cache MISSING! {func.__name__} called on {type(self).__name__} outside of context manager."
91-
)
89+
return func(self, collisions=collisions, **kwargs)
9290

9391
# 2. Create the cache key
9492
collisions_key = frozenset(collisions) if collisions else None

0 commit comments

Comments
 (0)