mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
add comment and align time from gen and stream to 30mins
This commit is contained in:
@@ -70,7 +70,10 @@ def gen_cache(func):
|
||||
return cached_response.decode('utf-8')
|
||||
|
||||
result = func(self, model, messages, *args, **kwargs)
|
||||
redis_client.set(cache_key, result, ex=3600)
|
||||
|
||||
# expire the cache after 30 minutes
|
||||
# set time in seconds
|
||||
redis_client.set(cache_key, result, ex=1800)
|
||||
|
||||
return result
|
||||
except ValueError as e:
|
||||
|
||||
Reference in New Issue
Block a user