mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
remove private from cache-control
This commit is contained in:
@@ -66,7 +66,7 @@ def cache(
|
||||
ret = await func(*args, **kwargs)
|
||||
encoded_ret = coder.encode(ret)
|
||||
await backend.set(cache_key, encoded_ret, expire)
|
||||
response.headers["Cache-Control"] = f"private, max-age={expire}"
|
||||
response.headers["Cache-Control"] = f"max-age={expire}"
|
||||
etag = f"W/{hash(encoded_ret)}"
|
||||
response.headers["ETag"] = etag
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user