NimCache (Full Page Caching for WordPress)
NimCache (Full Page Caching for WordPress)
The Nimbus Hosting platform now supports full page caching for WordPress sites. The feature is called NimCache, is available on our Neon packages and above and can be found on your sites dashboard and on the Performance tab.
When enabled, our full page caching feature will configure the web server to cache pages which are dynamically generated, reducing the time required to serve then to users. This should dramatically improve the load speed of your sites.
How does it work?
The caching feature leverages the power of NGINX caching to speed up your site. When you enable the feature several steps will happen in the background:
- The Nginx caching plug-in is installed onto your server.
- The web server is then configured to cache pages. This excludes common dynamic WP pages such as /wp-admin to avoid issues with cached content displaying to the wrong users.
- A caching plugin for WordPress will be installed onto your site. This works in unison with Nginx to tell it what to cache and for how long as well as what information needs clearing from the cache.
Once enabled, the web server will immediately start to cache responses. You can use the 'Clear Cache' button in the platform to purge all caches if required.
Exclusion rules
By default we will exclude common dynamic pages such as /wp-admin & /wp-login.php. However you may have specific custom pages on your site that you would like to exlude from the caching. These URLs can be excluded from caching using the exclusion rules. These rules allow wildcards (* asterisks), which match either nothing, or anything. For example:
- /my-site* - Matches both /my-site and /my-site/page1
- /my-site - Matches only /my-site
Checking the cache
We set a number of HTTP headers which you can use to help you work out of a page or element on your website is being served by NimCache which are:
Nimbus-Cache | HIT | URL is successfully being served from the NimCache inside NGINX |
---|---|---|
Nimbus-Cache | MISS | URL is not being served from the cache. |
Bypass-Reason | URI | Not cached due to the URI being excepted from the cache. |
Bypass-Reason | COOKIE | Not cached due to a cookie being set. |
If you are unsure on how to check for HTTP headers on your site then this can be done by using the Developer Tools in Google Chrome. Simply press F12 on your keyboard, or navigate to "More Tools > Developer Tools" from the Chrome menu to open them. Click on the network tab and refresh your the page to see the list of requests and click on the element you would like to check.
When inspecting an element or page on your website, look for Nimbus-Cache or BYPASS-REASON in the response header section. In the example above we can see that the homepage for our site is being served from the cache as we are seeing a HIT for the Nimbus-Cache header.
Common Reasons for pages not getting the cached
If you are seeing a something other than a HIT in the response headers then there can be a number of reasons for this:
Nimbus-Cache: MISS - This could be due to a missing an Expires header, or a Cache-Control header set by your site. These are required by NimCache to instruct it when to expire content from the cache. Without one of these, the response will not be cached. Check your WordPress settings or .htaccess files to make sure these are set up.
Bypass-Reason: URI - As mentioned above, we set up a number of exclusion rules for common URL's that you wouldn't want cached (for example the WordPress admin). This also includes any additional exclusion rules that may have been set up in the Platform.
Bypass-Reason: COOKIE - NimCache will not cache responses which contain any Set-Cookie headers. This is because cookies are considered private to the user which made the request. If the application is setting cookies on every request, it will never have its responses cached.
Updated 27 days ago