Can't use cacheDuration #5387
-
Hello, I have a JSON file that contains some layers that I'm trying to show in Terria without caching the file in the browser. So, I added
But the layers still caching, any thoughts?? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
HI @MoRadwan74. The property "cacheDuration" only applies to items that are proxied through terriajs-server See https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching & https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control to better understand the effect of specific caching headers. If the caching is not in headers it could be geoserver or maybe a reverse proxy in front of geoserver that's adding caching. |
Beta Was this translation helpful? Give feedback.
HI @MoRadwan74. The property "cacheDuration" only applies to items that are proxied through terriajs-server
proxy/
endpoint. I think something else must be adding cache headers. Check the network requests that terriajs makes (using network tab of browser debugger - you can filter to "localhost/geoserver/ows" to make it easier to find the relevant requests) and take a look at the cache headers.See https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching & https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control to better understand the effect of specific caching headers.
If the caching is not in headers it could be geoserver or maybe a reverse proxy in front of geoserver t…