Skip to content

Commit

Permalink
purge actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Davies committed Mar 4, 2013
1 parent aac0315 commit d0a6fb9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
10 changes: 9 additions & 1 deletion README.markdown
Expand Up @@ -6,7 +6,7 @@ WordPress Varnish
* Tags: cache, caching, performance, varnish, purge, speed
* Requires at least: 2.9.2
* Tested up to: 3.5.1
* Stable tag: 0.6
* Stable tag: 0.7

WordPress Varnish is a simple plugin that purges new and edited content.

Expand Down Expand Up @@ -78,6 +78,10 @@ Screenshots
Changelog
---------

### 0.7
* Added purge when post changes from future to publish, Thanks Marcin Pietrzak
* Added purge when theme switched, Thanks dupuis

### 0.6
* Removed plugins_loaded action as it doesnt do what was expected re: Issue
#12. Thank you Ben Favre, Pothi Kalimuthu and allinwonder
Expand Down Expand Up @@ -112,6 +116,10 @@ Changelog
Upgrade Notice
--------------

### 0.7
* Added purge when post changes from future to publish, Thanks Marcin Pietrzak
* Added purge when theme switched, Thanks dupuis

### 0.6
* Removed plugins_loaded action as it doesnt do what was expected re: Issue
#12. Thank you Ben Favre, Pothi Kalimuthu and allinwonder
Expand Down
10 changes: 9 additions & 1 deletion readme.txt
Expand Up @@ -4,7 +4,7 @@ Donate link: http://github.com/pkhamre/wp-varnish
Tags: cache, caching, performance, varnish, purge, speed
Requires at least: 2.9.2
* Tested up to: 3.5.1
* Stable tag: 0.6
* Stable tag: 0.7

WordPress Varnish is a simple plugin that purges new and edited content.

Expand Down Expand Up @@ -71,6 +71,10 @@ surfer's IP rather than the server's IP.

== Changelog ==

= 0.7 =
* Added purge when post changes from future to publish, Thanks Marcin Pietrzak
* Added purge when theme switched, Thanks dupuis

= 0.6 =
* Removed plugins_loaded action as it doesnt do what was expected re: Issue
#12. Thank you Ben Favre, Pothi Kalimuthu and allinwonder
Expand Down Expand Up @@ -101,6 +105,10 @@ surfer's IP rather than the server's IP.

== Upgrade Notice ==

= 0.7 =
* Added purge when post changes from future to publish, Thanks Marcin Pietrzak
* Added purge when theme switched, Thanks dupuis

= 0.6 =
* Removed plugins_loaded action as it doesnt do what was expected re: Issue
#12. Thank you Ben Favre, Pothi Kalimuthu and allinwonder
Expand Down
11 changes: 10 additions & 1 deletion wp-varnish.php
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: WordPress Varnish
Plugin URI: http://github.com/pkhamre/wp-varnish
Version: 0.6
Version: 0.7
Author: <a href="http://github.com/pkhamre/">Pål-Kristian Hamre</a>
Description: A plugin for purging Varnish cache when content is published or edited.
Expand Down Expand Up @@ -110,6 +110,15 @@ function WPVarnish() {
// When xmlRPC call is made
add_action('xmlrpc_call',array($this, 'WPVarnishPurgeAll'), 99);

// When a post changes from future to publish, Thanks Marcin Pietrzak
add_action('future_to_publish', array($this,
'WPVarnishPurgePost'), 99);
add_action('future_to_publish', array($this,
'WPVarnishPurgePurgeCommonObjects'), 99);

// When Theme is changed, Thanks dupuis
add_action('switch_theme',array($this, 'WPVarnishPurgeAll'), 99);

// When a new plugin is loaded
// this was added due to Issue #12, but, doesn't do what was intended
// commenting this out gets rid of the incessant purging.
Expand Down

0 comments on commit d0a6fb9

Please sign in to comment.