r6-operator-counters icon indicating copy to clipboard operation
r6-operator-counters copied to clipboard

Adding max-age to objects in AWS S3

Open BurkusCat opened this issue 7 years ago • 1 comments

  • Want to add a max age of about 2 weeks-3 months to all SVGs (these don't really change)
  • Want to add a max age of about 12 hours to operator data and HTML
  • What is the best way to do this whilst keeping everything automated from GitHub? Any advice would be much appreciated.

BurkusCat avatar Dec 26 '18 14:12 BurkusCat

Currently, in the AWS CodeBuild step, I sync the site to an S3 bucket and add a blanket max-age header of 24 hours to each object. Need to be able to cache the .svgs for longer.

When a deployment happens now, the CloudFront cache is invalidated for scripts, css and index page (not the .svgs)

BurkusCat avatar Jan 02 '19 20:01 BurkusCat