Managing the cache configuration for an app
Amplify uses Amazon CloudFront to manage the caching configuration for your hosted applications. A cache configuration is applied to each app to optimize for the best performance.
On August 13, 2024, Amplify released improvements to caching efficiency for applications. For more information, see CDN Caching Improvements for Better App Performance with AWS Amplify Hosting
The following table summarizes Amplify support for specific caching behaviors before and after the caching improvements release.
Caching behavior | Previous support | With caching improvements |
---|---|---|
You can add custom headers for an app in the Amplify console or in a |
Yes |
Yes |
Amplify respects the |
Yes | Yes |
Amplify respects the |
Yes |
Yes |
Each new CI/CD app deployment clears the cache. |
Yes |
Yes |
You can turn on performance mode for an app. |
Yes |
No The performance mode setting is no longer available in the
Amplify console. However, you can create a |
The following table lists the changes to the default values for specific cache settings.
Cache setting | Previous default value | Default value with caching improvements |
---|---|---|
Cache duration for static assets |
Two seconds |
One year |
Cache duration for reverse proxy responses |
Two seconds |
Zero seconds (no caching) |
Max Time to Live (TTL) |
Ten minutes |
One year |
For more information about how Amplify determines the caching configuration to apply to an application and instructions on managing cache key configuration, see the following topics.