Skip to content

Commit 692ea3a

Browse files
author
Sean Sullivan
committed
Set the headers to make the client side cache the response for the configured cache timeout time to prevent pointless rerequests
1 parent 32c49de commit 692ea3a

File tree

1 file changed

+1
-1
lines changed
  • elastic_datashader/routers

1 file changed

+1
-1
lines changed

elastic_datashader/routers/tms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def cached_response(es, idx, x, y, z, params, parameter_hash) -> Optional[Respon
157157
except NotFoundError:
158158
logger.warning("Unable to find cached tile entry in .datashader_tiles")
159159

160-
return make_image_response(img, params.get("user") or "", parameter_hash, 60)
160+
return make_image_response(img, params.get("user") or "", parameter_hash, config.cache_timeout.seconds)
161161

162162
logger.debug("Did not find image in cache: %s", tile_name(idx, x, y, z, parameter_hash))
163163
return None

0 commit comments

Comments
 (0)