We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42651a9 commit 81e418fCopy full SHA for 81e418f
backend/common/core/sqlbot_cache.py
@@ -124,6 +124,8 @@ async def wrapper(*args, **kwargs):
124
result = await func(*args, **kwargs)
125
126
actual_expire = expire + random.randint(-jitter, jitter)
127
+ if await backend.get(cache_key):
128
+ await backend.clear(cache_key)
129
await backend.set(cache_key, result, actual_expire)
130
131
SQLBotLogUtil.debug(f"Cache set: {cache_key} (expire: {actual_expire}s)")
0 commit comments