As doc said,we can use https://flat.badgen.net/.....?cache=300 to control cache time. But this option is no longer work.
From reponse header,I find the cache-control don't use the value set in 'cache' option:
curl --head https://flat.badgen.net/static/color/blue/blue?cache=300
HTTP/1.1 200 OK
Age: 0
Cache-Control: public, max-age=86400
Connection: keep-alive
Content-Length: 0
Content-Type: image/svg+xml;charset=utf-8
Date: Sat, 23 Sep 2023 02:58:26 GMT
Etag: "13lt1lma0fyiu"
Server: Vercel
Strict-Transport-Security: max-age=63072000
X-Matched-Path: /api/static
X-Vercel-Cache: MISS
X-Vercel-Id: sin1::sin1::wblkh-1695437906444-6252f7b3db1f
Cache-Control should be max-age=300 not max-age=86400 because I set '300' in cache option.
It will result the badgen which used in github and cache by github not update as expected, because github determines whether to update its image cache via Cache-Control.
ref: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls#an-image-that-changed-recently-is-not-updating
As doc said,we can use
https://flat.badgen.net/.....?cache=300to control cache time. But this option is no longer work.From reponse header,I find the cache-control don't use the value set in 'cache' option:
Cache-Control should be
max-age=300notmax-age=86400because I set '300' in cache option.It will result the badgen which used in github and cache by github not update as expected, because github determines whether to update its image cache via Cache-Control.
ref: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls#an-image-that-changed-recently-is-not-updating