← All 13 Plugins

Pyros

NGINX Cache Helper

Πῦρ (Pŷr) — Fire, heat, prewarming. In ancient cosmology, Pŷr is the active, transformative element of flame, warmth, and kinetic energy.

Category: Performance & Caching Version: 1.0.0 Requirements: PHP 7.4+ · WP 5.8+ Runtime: fastcgi_finish_request() · Async multi-cURL

Overview

Pyros (Greek for fire or heat) is an intelligent cache management plugin that automatically purges your NGINX FastCGI cache and instantly prewarms pages in the background. It integrates natively with WordPress hooks to ensure your cache is cleared precisely when needed, without human intervention or editor delays.

Architectural Rationale: Standard caching plugins freeze the WordPress editor during post publishing because they make synchronous purge requests over local HTTP connections before terminating the PHP response. Pyros cuts editor latency to 0ms by immediately invoking fastcgi_finish_request(), releasing the browser, and then performing the NGINX FastCGI purge and non-blocking multi-cURL prewarming in the background.

Key Features

  • Zero-Latency Perceived Purging

    Uses fastcgi_finish_request() to immediately release the user's browser during post updates.

  • Background Prewarming

    Executes asynchronous loopback multi-cURL requests to warm critical pages without monopolizing user-facing PHP-FPM workers.

  • Intelligent Comment Handling

    Completely ignores spam and unapproved comments, purging cache only on approved interactions.

  • Media Upload Debouncing

    Prevents server starvation during bulk media uploads by safely debouncing attachment purges.

  • Toolbar Integration

    "Rebuild Cache" button in the WordPress Admin Bar with real-time visual progress feedback.

  • WP-CLI Commands

    Complete terminal control via wp nginx purge, wp nginx prewarm, and wp nginx rebuild.

  • Granular Developer Filters

    Easily customize purge URLs, request headers, and cURL options for custom server architectures.

Technical Specifications

Server Requirement NGINX with ngx_cache_purge module (FastCGI cache)
Default Purge Endpoint https://127.0.0.1/purgeall (customizable via filter)
WP-CLI Commands wp nginx purge | wp nginx prewarm | wp nginx rebuild
Process Model Asynchronous background multi-cURL loopback
Database Footprint 0 custom tables, 0 database writes during purge

Developer Integration

# WP-CLI: Purge and prewarm NGINX cache
$ wp nginx rebuild

// PHP Filter: Custom purge URL for clustered NGINX
add_filter('pyros_purge_url', function($url) {
    return 'https://127.0.0.1/purgeall';
});
WP-CLI: $ wp nginx rebuild

Deployment Notes

Works out-of-the-box with custom NGINX proxy setups. Supports clustered cache purge endpoints and custom SSL client certificates.