caching updates

This commit is contained in:
ishaan-jaff 2023-09-08 18:06:46 -07:00
parent 47c1f57a24
commit 0ab62f13e8
4 changed files with 31 additions and 7 deletions

View file

@ -30,6 +30,7 @@ class RedisCache():
# cached_response is in `b{} convert it to ModelResponse
cached_response = cached_response.decode("utf-8") # Convert bytes to string
cached_response = json.loads(cached_response) # Convert string to dictionary
cached_response['cache'] = True # set cache-hit flag to True
return cached_response