adding cache-control header does not work #1472
-
Hi, tileProvider: NetworkTileProvider(
headers: {
'Cache-Control': 'public, max-age=31536000',
},
), Looking at the flutter devtool network tab it seems like they are being sent too. I also get a x-cache-key as a response. But Network Tools still shows me that it is doing request although it is calling the same tiles. Am I missing here something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @dario-digregorio, |
Beta Was this translation helpful? Give feedback.
Hi @dario-digregorio,
Unless Dart is doing something in the background, we don't make any effort to cache. For information about caching, please see https://docs.fleaflet.dev/usage/layers/tile-layer/tile-providers#caching-and-bulk-downloading.