reduce cache time
This commit is contained in:
parent
40a3ac2fc8
commit
7968d94c00
@ -4192,7 +4192,7 @@ async def get_market_flow(api_key: str = Security(get_api_key)):
|
|||||||
compressed_data = gzip.compress(data)
|
compressed_data = gzip.compress(data)
|
||||||
|
|
||||||
redis_client.set(cache_key, compressed_data)
|
redis_client.set(cache_key, compressed_data)
|
||||||
redis_client.expire(cache_key,5*60)
|
redis_client.expire(cache_key,2*60)
|
||||||
|
|
||||||
return StreamingResponse(
|
return StreamingResponse(
|
||||||
io.BytesIO(compressed_data),
|
io.BytesIO(compressed_data),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user