We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ab6c8e commit bde1d37Copy full SHA for bde1d37
src/clerk_backend_api/jwks_helpers/cache.py
@@ -1,4 +1,5 @@
1
import time
2
+from typing import Optional
3
4
class Cache:
5
""" In-memory cache with expiration. """
@@ -7,13 +8,13 @@ def __init__(self):
7
8
self.cache = {}
9
self.expiration_time = 300 # 5 minutes
10
- def set(self, key: str | None, value: str):
11
+ def set(self, key: Optional[str], value: str):
12
if key is None:
13
return
14
15
self.cache[key] = (value, time.time() + self.expiration_time)
16
- def get(self, key: str | None) -> str | None:
17
+ def get(self, key: Optional[str]) -> Optional[str]:
18
19
return None
20
0 commit comments