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 250+ data centers. When your site visitors load your website in their browser, cached responses will be delivered from the location closest to them.

Once beta testing is complete, Edge Caching will be included for free with all Kinsta plans. Unlike some similar caching solutions, there’s no additional cost to you, and Edge Caching doesn’t require a separate plugin.

Enable Edge Caching

To enable edge caching, log in to MyKinsta and go to WordPress Sites > sitename > Edge Caching.

Things To Know Before Enabling Edge Caching

  • Edge Caching does not currently respect narrow-scope geolocation cache variations (near country borders, state, city). The cache is saved in each PoP location based on the location of the first visitor to request that particular page.
  • Advanced Site Cache custom exclusions (such as combinations of custom cookies and URIs) are not respected by Edge Caching.
  • You can enable Edge Caching if our Support team has not configured custom cache rules for your site that use custom cookies or geolocation.
  • If your site serves different pages for mobile and desktop based on user-agent detection, it will not be compatible with our Edge caching.

Once you’ve read through the Things to know before enabling Edge Caching, click the Enable Edge Caching button if all looks well.

Enable Edge Caching in MyKinsta.
Enable Edge Caching in MyKinsta.

In the Enable Edge Caching modal/pop-up that appears, click the Enable Edge Caching button to confirm you want to enable it.

Confirm enabling Edge Caching in MyKinsta.
Confirm enabling Edge Caching in MyKinsta.

If we detect that custom cache rules have been added, a warning will be shown in the Enable Edge Caching modal. If you’re sure those rules will not conflict with Edge Caching, you can proceed by clicking on the Enable Edge Caching button. If you’re not sure, check with a developer to see if your site’s custom caching rules will be compatible with Edge Caching.

Custom cache rules warning when enabling Edge Caching that reads: It looks like you have previously configured custom caching rules. Custom rules can cause problems in some cases when used along with Edge Caching. Would you still like to proceed?
Custom cache rules warning when enabling Edge Caching.

 

Once Edge Caching is enabled, you’ll see the Edge Caching settings.

Edge Caching settings in MyKinsta.
Edge Caching settings in MyKinsta.

Clear Edge Cache

There are a couple of ways you can clear your site’s edge cache. Note: If your theme or an active plugin on your site has built-in cache, we recommend clearing the cache there first.

Clearing Cache in Your WordPress Dashboard

Log in to your WordPress dashboard.

If you need to clear the cache for the entire site, click the Clear Cache link in the admin toolbar near the upper right corner of the page. This will clear both Edge caching and Site cache.

Clear cache in WordPress with Kinsta MU plugin.
Clear cache in WordPress with Kinsta MU plugin.

If you would like the cache to be automatically cleared for specific URLs or paths when you make changes on your site, you can configure those in the Kinsta MU plugin Settings. Click Kinsta Cache in the left sidebar and add the URLs you want to purge when updates are made to your site. For more information, check out our guide on Adding Custom Caching URLs in the Kinsta MU plugin.

Clearing Cache in MyKinsta

Log in to MyKinsta and go to WordPress Sites > sitename > Edge Caching.

Click the Clear cache button to clear all cache.

Clear Edge Cache in MyKinsta.
Clear Edge Cache in MyKinsta.

If you only need to clear specific URLs or paths, enter the URL in the Clear URL cache field and click the Clear URL cache button. To also clear cache for subdirectories under the URL, check the box next to Clear cache of every subdirectory under the specified URL.

Clear Edge Cache for specific URLs.
Clear Edge Cache for specific URLs.

Note: This only clears Edge Caching. If your Site cache also needs to be cleared, you’ll need to clear that separately by going to Tools > Site cache and clicking the Clear cache button.

Test Edge Caching

Before testing your site with a website speed test tool, we recommend inspecting the HTTP headers of a page to confirm it is loading from the edge cache. Below are a few ways to check your site’s HTTP headers.

Check Edge Caching With Kinsta’s HTTP Status and Redirect Checker

You can check the HTTP status and redirect chain of any URL with our free HTTP status and redirect checker. Using this tool, you can review the response headers to check whether Edge Caching is working.

Choose a page that should be served from the edge cache and copy the URL from your browser’s address bar. Paste this URL into the redirect checker tool and run the check.

You should see results like this:

Kinsta Edge Cache headers, ki-cache-type and Ki-CFCache-Status, in HTTP status and redirect checker.
Edge Cache headers, ki-cache-type and Ki-CFCache-Status, in HTTP status and redirect checker.

Scroll down until you see Response headers. In this section, there are two headers to check the values of: ki-cache-type and Ki-CF-Cache-Status. The ki-cache-type header should have a value of Edge. The Ki-CF-Cache-Status header should have a value of HIT or SAVING.

Check Edge Caching With a Web Browser

You can use your web browser’s built-in developer tools to check whether Edge Caching is working. For this example, we’ll use Google Chrome to inspect HTTP headers for our site’s homepage. To launch the Chrome developer tools, right-click anywhere on the page and click Inspect.

Inspect with browser dev tools in Chrome.
Inspect with browser dev tools in Chrome.

Next, click on the Network tab and reload the page. As the page loads, you’ll see a list of the requests on the left-hand side of the developer tools window. Click on the initial page request to verify that Edge Caching is working correctly.

Kinsta Edge Cache headers, ki-cache-type and Ki-CFCache-Status, in the Network tab of browser dev tools.
Edge Cache headers, ki-cache-type and Ki-CFCache-Status, in the Network tab of browser dev tools.

In the Headers tab, scroll down until you see the Response Headers. In this section, there are two headers to check the values of: ki-cache-type and Ki-CF-Cache-Status. The ki-cache-type header should have a value of Edge. The Ki-CF-Cache-Status header should have a value of HIT or SAVING.

Check Edge Caching in Terminal

If you’re familiar with using Terminal (command line), you can also check HTTP headers with the curl command. Use the command below and substitute the URL at the end of the command with your site’s URL.

curl -L -s -o /dev/null -D - https://kinstaexample.com

After running this command, you should get a response like this:

Kinsta Edge Cache headers, ki-cache-type and Ki-CFCache-Status, in the command line.
Edge Cache headers, ki-cache-type and Ki-CFCache-Status, in the command line.

There are two headers to check the values of: ki-cache-type and Ki-CF-Cache-Status. The ki-cache-type header should have a value of Edge. The Ki-CF-Cache-Status header should have a value of HIT or SAVING.

Troubleshooting Edge Caching

If Edge Caching doesn’t seem to be working, there are a few things you can check for:

  • The value of the X-Kinsta-Cache header: Edge Caching only caches the response if it was already cached in Site cache (full page caching). If the value of X-Kinsta-Cache isn’t HIT, then the page isn’t cached in Site cache and cannot be cached by Edge Caching.
  • If you expect the page to be cached and it isn’t one commonly excluded from the cache (e.g. wp-admin, cart, my-account, checkout, etc.), you can check with our Support team to make sure the page doesn’t contain an excluded URL pattern or cookie in the site’s Nginx settings.
  • The value of the Cache-Control header: Edge Caching respects common values in this header, including no-cache, which bypasses the cache. This header value could be added because of a setting or code within your theme, or it could be added with a plugin like HTTP Headers.

Disable Edge Caching

After enabling Edge Caching, a green check mark is shown beside Enabled near the top of the page. To the right of this section, you can click the Disable button to disable Edge Caching.

Disable Edge Caching in MyKinsta.
Disable Edge Caching in MyKinsta.

Important Notes

  1. Currently, Edge Caching will not be enabled by default.
  2. Clearing Edge Cache in all of Cloudflare’s data centers may take 2-5 minutes to fully complete. Once you see the completion notice in MyKinsta, please allow 2-5 minutes for the cache to be cleared in all data centers. If you have a page that needs to be updated more often, our Support team can help you exclude that page from Edge Caching.
  3. Edge Caching can be enabled on live sites and premium staging environments. It cannot be enabled for standard staging environments.
  4. Edge caching is incompatible with narrow-scope geolocation cache variations or advanced site cache custom exclusions like combinations of custom cookies and URIs.
  5. If your site serves different pages for mobile and desktop based on user-agent detection, it will not be compatible with our Edge caching. It isn’t compatible because a page could first be visited by a mobile visitor, the page cached in Edge Caching, and then that cache will be served for all subsequent visitors (including desktop). This incompatibility doesn’t apply if your site uses client-side detection and the page is modified client-side. That’s compatible with Edge Caching because site visitors all receive the same page from cache/server, with changes made afterward by JS and/or CSS on the client-side.
  6. Edge Caching serves your Kinsta site/page cache but does not serve static assets like images, JavaScript files, and CSS files. Kinsta CDN, which is independent of Edge Caching, can be enabled to serve your site’s static assets.
  7. If Kinsta CDN is enabled, your site has an additional caching layer managed separately from Edge Caching. Clearing cache in the Kinsta MU plugin does not clear the Kinsta CDN cache, which needs to be cleared separately.
  8. We have caching rules in place for Edge Caching to work with standard WordPress, BuddyPress, WooCommerce, and Easy Digital Downloads sites. We exclude common private URIs and cookies, so your WordPress dashboard, forums, cart pages, or anywhere a user is logged in will automatically bypass caching. If you’re using a customized WordPress setup, there may be additional sections of your site that need to bypass cache or additional rules that need to be added for compatibility. If that is the case, you can always contact our Support team.
  9. Edge Cache is set to expire every 30 days but could be shorter if the edge cache isn’t accessed for some time.
  10. When updating pages in WordPress, there’s no need to manually clear the Site cache or Edge Caching; both will be automatically cleared.
  11. If you use your own Cloudflare account for your site, you can use Edge Caching if you do not use Cloudflare’s Automatic Platform Optimizations (APO). These two caching methods are incompatible, so you’ll want to use one or the other, not both.
  12. If you have blocked malicious IP addresses with the IP Deny tool in MyKinsta and do not want those blocked IP addresses to reach even a cached version of your site or be counted in analytics, do not enable Edge Caching. IP addresses blocked with the IP Deny tool are blocked at the Nginx level, not at the Cloudflare level. Since the Cloudflare level doesn’t have the details about IP addresses blocked at the Nginx level, when Edge Caching is enabled, a cached version of your site could be served to a blocked IP address from a Cloudflare data center. If you do not care whether or not a blocked IP address reaches a cached version of your site, you can enable Edge Caching. Note: visits to cached pages are counted in analytics, even if the IP address is blocked at the Nginx level.

Summary

If you want a way to speed up your site, give Edge Caching a try. It makes serving cached content from multiple data centers possible with minimal setup and no additional plugin required.