Introduction
A well configured caching adds different options to help you get the best result for your particular website. Learn more about super caching.
Table of Contents
Caching Levels
NGINX Direct Delivery File-Based Cache
When a page is loaded, it makes a copy of your static content – images, CSS, JavaScript, etc. and puts them into the server’s RAM. Next time your visitors load your webpage, the content is fetched directly from the server’s memory which is significantly faster than the server’s hard drive. Learn more about the static cache and the NGINX Direct Delivery option .
Dynamic Cache
A full-page caching mechanism for non-static resources. It caches the HTML output created by the PHP code of the website application and prevents unnecessary database queries, processing of each page visit, and more. It highly improves your loading speed and the TTFB (time to first byte) of your pages. Learn more about the dynamic cache and that caching option .
Memcached
An object caching mechanism designed to improve the connection between your application and its database. It greatly improves the loading speed of dynamic content that can’t be served by the dynamic Caching (checkout pages, dashboards and backends, etc). Learn more about the memcache and that caching option .
Drop-Ins

Those single files replace or enhance WordPress features in ways that are not possible for traditional plugins. Having both drop-ins is recommended. The advanced-cache.php file is created when the File-Based Caching is activated, while the object-cache.php file is created when the Memcached is activated .
CDN Cache
The content delivery network speeds up your website when you have geographically dispersed traffic across multiple countries and continents. The tool will cache your website content and will distribute it over multiple CDN data centers around the world. When someone visits your site the content will be delivered from the server closest to the visitor.
PHP OPcache
A caching engine built into PHP that stores cached files in the root folder of the hosting account. OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request. Learn more about the OPcache .
When to Clear Caches? How Often?
Automatic Purge
Website (SG Optimizer settings)
- Enable the smart cache purge option, based on events happening on your WordPress site.
- Enable the WordPress API cache to be purged too when clearing the cache.
CDN
Manual Purge
Dynamic and File-based
- Use this option when you’re modifying content and don’t have automatic purge enabled to make sure that old cached is purged right away.
Memcached
- Flush it after making updates on the site or if something happens to the service (for example if it crashes, if that happens the object-cache.php file in the wp-content folder will be automatically renamed).
OPcache
- Clear it periodically is recommend because it can keep obsolete files. It is a must when upgrading your PHP version used, otherwise every few months should be sufficient.
All of the above
How and Where to Clear Each Different Cache?
In WP Admin
If you use SG Speed Optimizer plugin, you can:
- schedule automatic purges and/or execute manual purges. Both options only do a smart purge.
- click “Purge SG Cache” in the top admin bar menu. That button does a full purge (Advanced, File-based and Object caches) for the site.
In SG Site Tools
- Speed > Caching > Dynamic Cache > Flush
- Speed > Caching > MemCached > Flush
- Speed > CDN > Cache Purge > Flush
And for the .OP Cache
- SG Site Tools > Devs > SSH Keys Manager > create a private ssh-rsa type key.
- Save your SSH user and logins credentials.
- Download PuTTY software.
- Use PuTTYgen to convert your SSH key in a DSA type .ppk format.
- Use Pageant to load your key.
- Use PuTTY to login > copy and paste the code below to clean the cache
rm -rf ~/.opcache/ - Full tutorial.
Discover more from SEO Services Bristol
Subscribe to get the latest posts sent to your email.
