★ 0stars
60composer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/goatherd/wp-cache/archive/refs/heads/master.zipAlso on Packagist as goatherd/gh-cache:
composer require goatherd/gh-cacheFrom the readme
gh-cache
WordPress request cache layer.
By default serves nginx reverse proxy/ fastcgi cache modules but is extendedable to use any request caching backend.
Features
generic request cache layer
cache, cache-veto and purge events
prepare event on plugins loaded hook
defines time-to-live filter (with implicite veto for non-positive times)
default event handlers (cache, veto, purge)
Requirements
PHP 5.3 or newer
WordPress 3.8+ (may work with older releases)
Default configuration features
enables proxy caching through X-accel-expires header
flushes cache on comment
flushes cache on post publish/ edit
flush some related posts by default
selectivly bypasses cache
can veto through gh-cache-veto filter
can override time-to-live through gh-cache-ttl filter
can extend purge to cover related URLs
Requirements
nginx
php curl module
can edit vhost configuration
Installation
TODO explain nginx config (simple)
TODO explain nginx config (full)
TODO explain nginx config (advanced purge for nginx 1.5.7+ and purge module)
Incompatibilities
Set-Cookie headers prevent caching
If your WordPress installation relies on sessions caching will be rather limited or imposs