Skip to content

Commit 78368b3

Browse files
committed
Cache _looks_like_asgi3
1 parent f63d40c commit 78368b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sentry_sdk/integrations/asgi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import asyncio
88
import inspect
99
from copy import deepcopy
10-
from functools import partial
10+
from functools import lru_cache, partial
1111

1212
import sentry_sdk
1313
from sentry_sdk.api import continue_trace
@@ -67,6 +67,7 @@ def _capture_exception(exc, mechanism_type="asgi"):
6767
sentry_sdk.capture_event(event, hint=hint)
6868

6969

70+
@lru_cache(maxsize=5)
7071
def _looks_like_asgi3(app):
7172
# type: (Any) -> bool
7273
"""

0 commit comments

Comments
 (0)