File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -295,7 +295,11 @@ def get_image_blob(self, image_id: str) -> Response:
295295 r = requests .request (
296296 "GET" , ACCESSY_URL + f"/fs/download/{ image_id } " , headers = {"Authorization" : f"Bearer { self .session_token } " }
297297 )
298- return Response (r .content , headers = r .headers , status = r .status_code )
298+ res = Response (r .content , headers = r .headers , status = r .status_code )
299+ res .cache_control .max_age = 86400 # Cache for 1 day
300+ res .cache_control .public = True # Allow public caching
301+ res .cache_control .immutable = True # Response will not change
302+ return res
299303
300304 def get_member_id_from_accessy_id (self , accessy_id : UUID ) -> Optional [int ]:
301305 if accessy_id in self ._accessy_id_to_member_id_cache :
You can’t perform that action at this time.
0 commit comments