Developers
Ipstenu |
Download Stats
Today | 995 |
Yesterday | 3,800 |
Last Week | 41,674 |
All Time | 515,142 |
This plugin does not install nor configure a cache proxy. It acts as an interface with such services.
One common method of caching content for websites is via the use of reverse proxy caching. Common examples of this are Varnish and Nginx. These systems allow a website to update content and have the visitor's experience cached without the need for complex plugins storing the files locally and using up a user's disk space.
A reverse proxy cache is installed in front of a server and reviews requests. If the page being requested is already cached, it delivers the cached content. Otherwise it generates the page and the cache on demand.
The Proxy Cache Purge plugin sends a request to delete (aka flush) the cached data of a page or post every time it's modified.
How It Works
When content on a site is updated by WordPress, the plugin reaches out to the proxy cache service with the URL of the page, requesting the cache be deleted.
Not all page are deleted from the cache on every change. For example, when a post, page, or custom post type is edited, or a new comment is added, only the following pages will purge:
- The front page
- The post/page edited
- Any categories, tags, and/or custom taxonomies associated with the page
- Related feeds
- Associated JSON API pages
In addition, your entire cache will be deleted on the following actions:
- Changing themes
- Pressing the Empty Cache button on the toolbar
Plugins can hook into the purge actions as well, to filter their own events to trigger a purge.
On a multisite network using subfolders, only network admins can purge the main site.
Development Mode
If you're working on a site and need to turn off caching in one of two ways:
- Add
define( 'VHP_DEVMODE', true );
to yourwp-config.php
file - Go to Proxy Cache -> Settings and enable debug mode for 24 hours at a time
That will break cache on page loads. It is not recommended for production!
WP CLI
Purge
Purge commands let you empty the cache.
-
wp varnish purge
- Flush the cache for your front page -
wp varnish purge [<url>]
- Flush the cache for one URL
You can use the parameter --wildcard
to empty everything from that URL down. So if you wanted to empty cache for all themes, you would do this:
wp varnish purge https://example.com/wp-content/themes --wildcard
Debug
Debugging can help you figure out why your cache isn't working as well as it could. The default is for your home page, but you can pass any URL on your domain.
wp varnish debug [<url>]
Available parameters:
-
[--include-headers]
-- Include headers in debug check output -
[--include-grep]
-- Grep active theme and plugin directories for common issues
DevMode
Development mode allows you to disable the cache, temporarily.
-
wp varnish devmode [<activate|deactivate|toggle>]
- Change development mode state
Privacy Policy
As of version 5, this plugin no longer uses any remote data.
Releases (34 )
Version | Release Date | Change Log |
---|---|---|
5.1.3 | 2022-06-09 |
|
5.1.2 | 2022-04-12 |
|
5.1.1 | 2022-04-12 |
|
5.1.0 | 2022-02-15 | |
5.0.3 | 2021-08-30 |
|
5.0.2 | 2021-04-30 |
|
5.0.1 | 2021-04-29 | |
5.0 | 2021-03-30 |
= |
4.8.1 | 2019-05-07 |
|
4.8 | 2019-04-04 |
= |
4.7.3 | 2018-12-07 |
|
4.7.2 | 2018-10-23 |
|
4.7.1 | 2018-10-11 |
|
4.7.0 | 2018-10-08 |
= |
4.6.6 | 2018-09-26 |
|
4.6.5 | 2018-09-07 |
|
4.6.4 | 2018-09-06 |
|
4.6.3 | 2018-08-08 |
|
4.6.2 | 2018-07-13 |
|
4.6.1 | 2018-07-10 | |
4.6.0 | 2018-07-10 |
|
4.5.2 | 2018-06-08 |
|
4.5.1 | 2018-06-04 |
|
4.5.0 | 2018-05-10 |
= |
4.4.0 | 2018-04-10 |
= |
4.3.1 | 2017-10-10 |
|
4.3.0 | 2017-10-10 |
|
4.2.0 | 2017-08-31 |
|
4.1.1 | 2017-05-18 |
|
4.1 | 2017-04-05 |
= |
4.0.3 | 2017-03-02 |
|
4.0.2 | 2016-11-28 |
|
4.0.1 | 2016-11-18 |
|
4.0 | 2016-11-16 |
= |