Allow user to use their own cloudfront cache policy
Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the FAQ.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting questions.
- [X] I have removed any sensitive information from my code snippets and submission.
App Id
d2xnowwx5rp3ry
AWS Region
us-east-1
Amplify Hosting feature
SSR
Is your feature request related to a problem? Please describe:
We host our Next.js application in Amplify but since it is using a managed cache policy in CloudFront that includes the cookies to generate the cache key, different users generate a different cache key that causes a significant page load time initially for users.
Describe how you'd like this feature to work
For this feature, our request is to allow an option to use a CloudFront cache policy that we define to have more control on how we should cache our pages.
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!
Hi @mrbnclt 👋🏻 , thanks for opening this! I'm on the Amplify team and would like to get a bit more feedback here from you, if possible. If you're on the the Amplify Discord Server, my username is siegerts_ and we can set up a chat. Thanks!
Hi @siegerts 👋🏻, I've sent a message in Discord.
Hi @siegerts, appreciate your help looking into this! We have the same use case (disable cookie-based caching). We've been watching issues/2243 for a long... long... time now.
Any updates on this?
Any updates on this, my cache is hitting miss on amplify
Hello -- We just had a feature launch today that should fix your root issue. We now allow users to remove the cookies from the cache key. This seemed to be your main concern. We are a managed service so it is not possible for users to attach or alter the cloudfront caching policy directly.
Please view our blog post for more info: https://aws.amazon.com/blogs/mobile/cdn-caching-improvements-for-better-app-performance-with-aws-amplify-hosting/
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
This issue has been automatically locked.