Improve browser caching with cache control header #335

Merged
Irev-Dev merged 1 commits from kurt/improve-caching-334 into main 2021-05-31 09:00:29 +02:00
Irev-Dev commented 2021-05-31 08:57:44 +02:00 (Migrated from github.com)

Not only does the header need to be added, but the signed URL needs to
have it's expiry rounded so that the return url is the same for a given
window, say 10minutes

I followed this https://advancedweb.hu/cacheable-s3-signed-urls/
basically what this means is that because we're caching the assets
themselves, if as user asks for a part that already exists we'll return
a url for the existing part instead of regenerating it, however if it
was them that generated the part less than 10 minutes ago, they'll still
have to download the asset again. This way it will save us costs and
will be quicker for them.

Resolves #334

Not only does the header need to be added, but the signed URL needs to have it's expiry rounded so that the return url is the same for a given window, say 10minutes I followed this https://advancedweb.hu/cacheable-s3-signed-urls/ basically what this means is that because we're caching the assets themselves, if as user asks for a part that already exists we'll return a url for the existing part instead of regenerating it, however if it was them that generated the part less than 10 minutes ago, they'll still have to download the asset again. This way it will save us costs and will be quicker for them. Resolves #334
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#335