caching – Cache on Cloudfront for a year, but browser should revalidate every 24 hours

I have a JS asset which needs to be served from a fixed URL, so I can’t use versioning. (Many different sites are already accessing it, and they can’t be changed easily)

The file is sitting on AWS Cloudfront.

I would like the file to be cached in browsers for up to a year, but still revalidate every 24 hours. It is not vital to be exactly 24 hours. The file is being updated roughly every month.

I was thinking of using these headers:

cache-control: public, max-age=31536000, must-revalidate, proxy-revalidate, stale-while-revalidate=6800

When a new version of the file is published to the CDN I could issue a Cache Invalidate command from Travis.