Spaces:
Sleeping
Sleeping
Commit
·
abd776c
1
Parent(s):
ca63886
Updated cache time
Browse files
api/routers/analytics_chatbot.py
CHANGED
|
@@ -45,6 +45,6 @@ def get_analytics(msg:str):
|
|
| 45 |
}
|
| 46 |
|
| 47 |
# Save to Redis with TTL (e.g., 1 hour)
|
| 48 |
-
redis_client.set(cache_key, json.dumps(response_to_cache), ex=
|
| 49 |
|
| 50 |
return response_to_cache
|
|
|
|
| 45 |
}
|
| 46 |
|
| 47 |
# Save to Redis with TTL (e.g., 1 hour)
|
| 48 |
+
redis_client.set(cache_key, json.dumps(response_to_cache), ex=60) # ex=seconds
|
| 49 |
|
| 50 |
return response_to_cache
|