1 comment

[ 3.5 ms ] story [ 16.3 ms ] thread
Netlify's caching for dynamic data has been broken for a long time.

For example, Functions cache on the path only, excluding any query strings. This was reported in May 2020 [0], still unfixed. This means you cannot have any content that you want cached in a query string. It must go in the path.

I just deployed a test site now[1]. Try modifying the query string params. No matter what you change, the first request/response is cached (for 10 seconds 'cache-control: public, max-age=10')

[0]: https://answers.netlify.com/t/netlify-function-with-query-st...

[1]: https://zen-blackwell-f7a1bd.netlify.app/.netlify/functions/...