Edge Caching
Edge Caching saves your Kinsta site/page cache (which is only saved to your site’s data center) to any of Cloudflare’s global network of 260+ data centers. When your visitors load your application in their browser, cached responses will be delivered from the location closest to them, increasing the performance and speed of your application.
Edge Caching serves your Kinsta site/page cache but does not serve static assets like images, JavaScript files, and CSS files. Kinsta’s CDN, which is independent of Edge Caching, can be enabled to serve your static assets. If Kinsta CDN is enabled, your site has an additional caching layer managed separately from Edge Caching. When you clear the Edge Cache for applications this also clears the CDN cache.
Edge Caching is not enabled by default on Application Hosting.
Enable or Disable Edge Caching
Edge Caching for applications can be enabled or disabled by sending a POST
request with the edge-cache API endpoint. To access and use the API with your account, you need to generate an API Key.
To use the Edge Caching API endpoint you need you need your application’s unique ID. You can obtain this programmatically by listing all applications associated with your Kinsta company with the applications endpoint, which provides essential details about each application.
The application’s Overview page shows if Edge Caching is enabled or disabled.
![Application Overview page showing Edge Caching is enabled.](https://kinsta.com/_next/image/?url=https%3A%2F%2Fkinsta.com%2Fwp-content%2Fuploads%2F2024%2F03%2Fapplication-edge-caching-enabled.png&w=3840&q=75)
Clear Edge Cache
You can clear the Edge Cache for an application by sending a POST
request with the clear-cache API endpoint. If you have enabled the CDN, this also clears the CDN cache.
Clearing Edge Cache in all of Cloudflare’s data centers may take 2-5 minutes to fully complete.