Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control how the CloudFront cache is invalidated #369

Open
Nyholm opened this issue Oct 26, 2023 · 1 comment
Open

Control how the CloudFront cache is invalidated #369

Nyholm opened this issue Oct 26, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Nyholm
Copy link

Nyholm commented Oct 26, 2023

Start from the Use-case

I am running a single page react app. I have 10 different JS files (chunks) after I build my app.

It is normal that a user request 3-5 js files while they are using a part of the application. When they browse to another part they will download more files.

There is an issue if I decide to deploy a new version. Then the additional files are removed from the S3 and CDN. Now when the user asks for the additional files they get a 404.

I suggest to allow us to keep some files on S3 or CloudFront.
Of course I would be open for alternative solutions

Example Config

No response

Implementation Idea

No response

@Nyholm Nyholm added the enhancement New feature or request label Oct 26, 2023
@mnapoli
Copy link
Member

mnapoli commented Oct 26, 2023

I wonder if we could (and if S3 allows it), instead of deleting "obsolete" files, set them to expire (be deleted) after 1 day 🤔 I haven't researched that at all but that would be a solution that we could apply by default for everyone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants