Cache-Control on static assets are in milliseconds instead of seconds

:wave: Hello

I am trying to set a custom domain in front of cdn.builder.io to serve my website asset (images, ā€¦) but I have issue with the Cache-Control header return by your CDN server.

When trying to query on image for example:

curl -sD /dev/stderr 'https://cdn.builder.io/api/v1/image/assets%2F55b3a60057ec49deaece31037f2f4c41%2F3a29efc3aaa34affa44e0d54dee58c4e' > /dev/null
HTTP/2 200
...
cache-control: public, max-age=2592000000, s-maxage=2592000000, stale-if-error=2678400, stale-while-revalidate=86400
date: Mon, 29 Apr 2024 18:47:50 GMT
...

It look like the value for max-age=2592000000 and s-maxage=2592000000 in the Cache-Control response header are set in millisecond instead of second as they should be (Cache-Control - HTTP | MDN)
So instead of caching it for 1 month ( 720h ā†’ 2592000s ) you set a cache duration of +80 year.

This is a veeeeerrrryyyy long time to cache a ressource :sweat_smile: and many CDN provider (in our case GCP) add a hard limit 1 year preventing our cache to work properly. I also add that some browser might refuse to cache for that long.

Hello Jerome,

Thank you for the forum post! I would like to mention that our Engineers are aware of the issue and are working on a solution. We understand the impact this has and have prioritized working on a release. I will be keeping up-to-date and hope to provide you with an update as soon as Iā€™m aware of any progress.

Hi @jerome-quere - I wanted to confirm that our Engineering team has reviewed the issue and addressed it by reviewing our caching strategy.