Skip to content

Commit 9b68cd0

Browse files
committed
All the caching.
1 parent 02a9419 commit 9b68cd0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/src/multiaccessy/accessy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,9 @@ def get_image_blob(self, image_id: str) -> Response:
299299
res.cache_control.max_age = 86400 # Cache for 1 day
300300
res.cache_control.public = True # Allow public caching
301301
res.cache_control.immutable = True # Response will not change
302-
res.cache_control.no_cache = False
303-
res.cache_control.no_store = False
302+
res.cache_control.no_cache = None # Do not force revalidation
303+
res.cache_control.no_store = False # Allow caching
304+
res.cache_control.must_revalidate = False # Allow using cache if connection fails
304305
return res
305306

306307
def get_member_id_from_accessy_id(self, accessy_id: UUID) -> Optional[int]:

0 commit comments

Comments
 (0)