The NGINX FastCGI Cache is one of the most powerful caching mechanisms available for WordPress, especially on servers managed by RunCloud. By selecting the Server cache type, RunCache automatically leverages this server-level caching system.
Instead of using PHP or an external service to manage the cached files, NGINX FastCGI Cache stores static HTML pages directly on the server’s disk, with caching logic handled entirely by NGINX.
- Cache Miss: NGINX forwards the request to PHP-FPM (where WordPress runs). WordPress generates the page. NGINX intercepts the output, saves a copy in its dedicated cache directory, and then sends it to the visitor.
- Cache Hit: For subsequent requests to the same page, NGINX checks its cache. If a valid cached copy exists, NGINX serves the file directly from the disk to the visitor. This process completely bypasses the need to execute PHP, query the database, or even load the WordPress application, resulting in near-instantaneous load times.
Benefits of NGINX FastCGI Cache
| Feature | Description |
|---|---|
| Server-Level Performance | Highest possible TTFB because the cache is served directly by the web server (NGINX). |
| Efficient Resource Use | Dramatically reduces CPU and RAM usage by preventing unnecessary PHP/database execution. |
| Granular Purging | Supports purging individual URLs, archives, or entire caches via the RunCache plugin interface. |
| Scalability | Ideal for handling sudden traffic spikes, as NGINX is extremely efficient at serving static files. |