A lightweight Go-based background daemon that syncs NGINX FastCGI/Proxy cache clears across multiple WordPress replicas.
Designed for clustered or containerized environments where each replica maintains its own local NGINX cache, this tool ensures consistent cache invalidation by polling a shared MySQL database for updates.
- Polls central WordPress wp_optionstable fornginx_cache_last_cleared
- Compares to local state to determine if cache needs clearing
- Clears local NGINX cache when needed
- Stores last-seen timestamp in a local file
Use this together with the companion plugin:
This WordPress plugin:
- Automatically clears the local NGINX cache on post, comment, plugin, or WooCommerce events
- Updates the nginx_cache_last_clearedvalue in the WordPress database
- Supports Composer installation:
composer require pds-uk/nginx-cache-helper