From bd68126e1ff856a08a60ddfac98014abe428a37b Mon Sep 17 00:00:00 2001
From: Peter Molnar
Date: Wed, 20 Mar 2013 10:49:56 +0000
Subject: [PATCH 1/5] readme modifications
---
readme.txt | 61 ++++++++++++++++++++++++++++++------------------------
1 file changed, 34 insertions(+), 27 deletions(-)
diff --git a/readme.txt b/readme.txt
index 651346f..180e95c 100644
--- a/readme.txt
+++ b/readme.txt
@@ -44,29 +44,6 @@ Thanks for [Hyper Cache](http://wordpress.org/extend/plugins/hyper-cache "Hyper
= How to use the plugin on Amazon Linux? =
You have to remove the default yum package, named `php-pecl-memcache` and install `Memcached` through PECL.
-= Information: network wide settings always overwrite site settings =
-Since the plugin can be used as per-site configured in a network, if the plugin get network active later, the network settings will always overwrite the per site configuration.
-
-= Information: Log levels =
-Log levels ( if logging enabled ) includes info, warning and error level messages; error level most usually means PHP configuration error or missing plugin configuration.
-
-= Information: Using it with NGiNX =
-If the storage engine is either PHP Memcache or PHP Memcached extension, the created entries can be read and served directly from NGiNX ( if it has memcache or memc extension )
-A short configuration example is generated on the plugin settings page, under `NGiNX` tab according to the saved settings.
-**NOTE** Some features ( most of additional HTTP headers for example, like pingback, shortlink, etc. ) will not be available with this solution.
-
-= Information: Support & Info =
-I provide support for the plugin as best as I can, but it comes without guarantee.
-Please post feature requests to [WP-FFPC feature request topic](http://wordpress.org/support/topic/feature-requests-14 "WP-FFPC feature request topic").
-
-= PLugin requirements =
-* WordPress >= 3.0
-
-and **at least one** of the following for storage backend:
-* PHP APC
-* PHP Memcached > 0.1.0
-* PHP Memcache > 2.1.0
-
== Screenshots ==
1. settings screen, cache type and basic settings
@@ -81,14 +58,15 @@ and **at least one** of the following for storage backend:
= 1.0 =
*in RC state*
-* plugin development using [GitHub repository](https://github.com/petermolnar/wp-ffpc "GitHub repository") from this version; WordPress SVN only for releases
+* plugin development using [GitHub repository](https://github.com/petermolnar/wp-ffpc "GitHub repository") from this version
* Software licence change from GPLv2 to GPLv3
* backend code completely replaced ( object-based backend, improved readability & better structure, lot less global vars, etc. )
* added proper uninstall ( uninstall hook was not removing options from DB, uninstall.php will )
-* revisited multisite support ( solved overwriting-problems )
-* preparations for localization support ( all strings are now go through WordPress translate except for advanced-cache logging, since there's no WordPress available at that point )
-* more and more detailed log & error messages
+* revisited multisite support ( eliminated overwriting-problems )
+* preparations for localization support ( all strings are now go through WordPress translate if available )
+* more detailed log & error messages
* retouched Memcache initialization ( faster connect, cleaner persistent connections )
+* proper settings migration from previous versions
**Bugfixes**
@@ -208,3 +186,32 @@ There are major problems with the "memcache" driver, the source is yet unkown. T
*2012.02.16*
* first public release
+
+== Information & requirements ==
+
+= Using the plugin in a WordPress Network =
+From version 1.0, the plugin supports subdomain based WordPress Network with possible different per site cache settings. If the plugin is network active, obviously the network wide settings will be used for all of the sites. If it's activated only on some of the sites, the other will not be affected and even the cache storage backend can be different from site to site.
+
+= Log levels =
+Log levels ( if logging enabled ) includes warning and error level messages; error level most usually means PHP configuration error or missing plugin configuration.
+Additional info level log is available as additional setting, but if log is disabled, so will info log as well.
+
+= Using the plugin with NGiNX =
+If the storage engine is either PHP Memcache or PHP Memcached extension, the created entries can be read and served directly from NGiNX ( if it has memcache or memc extension )
+A short configuration example is generated on the plugin settings page, under `NGiNX` tab according to the saved settings.
+**NOTE:** Some features ( most of additional HTTP headers for example, like pingback, shortlink, etc. ) will not be available with this solution.
+
+= Support =
+I provide support for the plugin as best as I can, but it comes without guarantee.
+Please post feature requests to [WP-FFPC feature request topic](http://wordpress.org/support/topic/feature-requests-14 "WP-FFPC feature request topic") and any questions on the forum.
+
+= Contribution =
+In order to make contributions a lot easier, I've moved the plugin development to [GitHub](https://github.com/petermolnar/wp-ffpc "GitHub"), feel free to fork and put shiny, new things in it.
+
+== Requirements ==
+* WordPress >= 3.0
+
+and **at least one** of the following for storage backend:
+* PHP APC
+* PHP Memcached > 0.1.0
+* PHP Memcache > 2.1.0
From e6ad0029f3d2689d4cc1222fcff4e050f87dbd34 Mon Sep 17 00:00:00 2001
From: Peter Molnar
Date: Wed, 20 Mar 2013 17:43:29 +0000
Subject: [PATCH 2/5] removed default: sections; corrected log default value
bug cause by migration
---
wp-ffpc-admin.css | 10 ++--------
wp-ffpc-class.php | 29 ++++++++---------------------
2 files changed, 10 insertions(+), 29 deletions(-)
diff --git a/wp-ffpc-admin.css b/wp-ffpc-admin.css
index 6ebafcb..2b06d3d 100644
--- a/wp-ffpc-admin.css
+++ b/wp-ffpc-admin.css
@@ -15,15 +15,9 @@
visibility: hidden;
}
-.plugin-admin .default {
- display:block;
- padding-left: 1em;
- font-size:90%;
- color:#666;
-}
-
.plugin-admin .description {
- display:block;
+ display: block;
+ padding-top: 0.3em;
}
.plugin-admin .tabs {
diff --git a/wp-ffpc-class.php b/wp-ffpc-class.php
index f4e29d5..a5142b5 100644
--- a/wp-ffpc-class.php
+++ b/wp-ffpc-class.php
@@ -292,7 +292,6 @@ if ( ! class_exists( 'WP_FFPC' ) ) {
print_select_options ( $this->select_cache_type , $this->options['cache_type'], $this->valid_cache_type ) ?>
plugin_constant); ?>
- print_default ( 'cache_type' ); ?>
@@ -321,7 +318,6 @@ if ( ! class_exists( 'WP_FFPC' ) ) {
print_select_options ( $this->select_invalidation_method , $this->options['invalidation_method'] ) ?>
Be careful! Selecting "flush cache" will flush the whole cache, including elements that might have been set and used by other applications. Also, invalidating only the post will _not_ clear categories, archive and taxonomy pages, therefore only use this if refreshing after publish can wait until the entries expire on their own.
No spaces are allowed, please stick to use ":" for separating host and port and "," for separating entries. Do not add trailing ",".', $this->plugin_constant); ?>
- print_default ( 'hosts' ); ?>
@@ -555,18 +538,22 @@ if ( ! class_exists( 'WP_FFPC' ) ) {
/* updating from version 0.4.x */
if ( !empty ( $options['host'] ) ) {
$options['hosts'] = $options['host'] . ':' . $options['port'];
+ /* renamed options */
+ $options['log'] = $options['syslog'];
+ $options['response_header'] = $options['debug'];
}
/* migrating from version 0.6.x */
elseif ( is_array ( $options ) && array_key_exists ( $this->global_config_key , $options ) ) {
$options = $options[ $this->global_config_key ];
+ /* renamed options */
+ $options['log'] = $options['syslog'];
+ $options['response_header'] = $options['debug'];
}
/* migrating from something, drop previous config */
else {
$options = array();
}
- /* renamed options */
- $options['log'] = $options['syslog'];
- $options['response_header'] = $options['debug'];
+
}
}
From fba2f85699b603fd592379b7d10295f184a1f94b Mon Sep 17 00:00:00 2001
From: Peter Molnar
Date: Fri, 22 Mar 2013 10:36:42 +0000
Subject: [PATCH 3/5] final touches on migration
---
readme.txt | 12 +++++-------
wp-ffpc-class.php | 36 +++++++++++++++++++++++++++++-------
2 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/readme.txt b/readme.txt
index 180e95c..bdaf321 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: cache, memcached, full page cache, NGiNX, memcache, page cache
Requires at least: 3.0
Tested up to: 3.5.1
-Stable tag: 0.6.1
+Stable tag: 1.0
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -49,9 +49,8 @@ You have to remove the default yum package, named `php-pecl-memcache` and instal
1. settings screen, cache type and basic settings
2. debug and in depth-options
3. cache exceptions
-4. apc settings
-5. memcached servers settings
-6. NGiNX example
+4. memcached servers settings
+5. NGiNX example
== Changelog ==
@@ -78,9 +77,8 @@ You have to remove the default yum package, named `php-pecl-memcache` and instal
* APC entry compression support
-**Planned features for next major release**
+**Planned features**
-* support for Redis backend
* optional NGiNX header preservation for shortlink, pingback and last-modified headers
= 0.6.1 =
@@ -208,7 +206,7 @@ Please post feature requests to [WP-FFPC feature request topic](http://wordpress
= Contribution =
In order to make contributions a lot easier, I've moved the plugin development to [GitHub](https://github.com/petermolnar/wp-ffpc "GitHub"), feel free to fork and put shiny, new things in it.
-== Requirements ==
+= Requirements =
* WordPress >= 3.0
and **at least one** of the following for storage backend:
diff --git a/wp-ffpc-class.php b/wp-ffpc-class.php
index a5142b5..945d54e 100644
--- a/wp-ffpc-class.php
+++ b/wp-ffpc-class.php
@@ -524,6 +524,7 @@ if ( ! class_exists( 'WP_FFPC' ) ) {
*
*/
public function plugin_hook_options_migrate( &$options ) {
+ $migrated = false;
if ( $options['version'] != $this->plugin_version || !isset ( $options['version'] ) ) {
@@ -535,25 +536,46 @@ if ( ! class_exists( 'WP_FFPC' ) ) {
unlink ( $fname );
}
- /* updating from version 0.4.x */
+ /* look for previous config leftovers */
+ $try = get_site_option( $this->plugin_constant );
+ /* network option key changed, remove & migrate the leftovers if there's any */
+ if ( !empty ( $try ) && $this->network ) {
+ /* clean it up, we don't use it anymore */
+ delete_site_option ( $this->plugin_constant );
+
+ if ( empty ( $options ) && array_key_exists ( $this->global_config_key, $try ) ) {
+ $options = $try [ $this->global_config_key ];
+ $migrated = true;
+ }
+ elseif ( empty ( $options ) && array_key_exists ( 'host', $try ) ) {
+ $options = $try;
+ $migrated = true;
+ }
+ }
+
+ /* updating from version <= 0.4.x */
if ( !empty ( $options['host'] ) ) {
$options['hosts'] = $options['host'] . ':' . $options['port'];
- /* renamed options */
- $options['log'] = $options['syslog'];
- $options['response_header'] = $options['debug'];
+ $migrated = true;
}
/* migrating from version 0.6.x */
elseif ( is_array ( $options ) && array_key_exists ( $this->global_config_key , $options ) ) {
$options = $options[ $this->global_config_key ];
- /* renamed options */
- $options['log'] = $options['syslog'];
- $options['response_header'] = $options['debug'];
+ $migrated = true;
}
/* migrating from something, drop previous config */
else {
$options = array();
}
+ if ( $migrated ) {
+ /* renamed options */
+ if ( isset ( $options['syslog'] ) )
+ $options['log'] = $options['syslog'];
+ if ( isset ( $options['debug'] ) )
+ $options['response_header'] = $options['debug'];
+ }
+
}
}
From 61d0188ea8c02d65d60bc30d57dcb61fcf10f41e Mon Sep 17 00:00:00 2001
From: Peter Molnar
Date: Fri, 22 Mar 2013 10:39:05 +0000
Subject: [PATCH 4/5] 1.0 readme finished
---
readme.txt | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/readme.txt b/readme.txt
index bdaf321..b670fe9 100644
--- a/readme.txt
+++ b/readme.txt
@@ -55,7 +55,7 @@ You have to remove the default yum package, named `php-pecl-memcache` and instal
== Changelog ==
= 1.0 =
-*in RC state*
+*2013.03.22*
* plugin development using [GitHub repository](https://github.com/petermolnar/wp-ffpc "GitHub repository") from this version
* Software licence change from GPLv2 to GPLv3
@@ -69,7 +69,7 @@ You have to remove the default yum package, named `php-pecl-memcache` and instal
**Bugfixes**
-* reported bug of faulty expiration times fixed
+* faulty expiration times fixed
* eliminated warning message for memcache when no memcache extension is present
* fixed multisite settings overwriting issue
@@ -77,10 +77,6 @@ You have to remove the default yum package, named `php-pecl-memcache` and instal
* APC entry compression support
-**Planned features**
-
-* optional NGiNX header preservation for shortlink, pingback and last-modified headers
-
= 0.6.1 =
*2013.03.08*
@@ -185,7 +181,7 @@ There are major problems with the "memcache" driver, the source is yet unkown. T
* first public release
-== Information & requirements ==
+== Information ==
= Using the plugin in a WordPress Network =
From version 1.0, the plugin supports subdomain based WordPress Network with possible different per site cache settings. If the plugin is network active, obviously the network wide settings will be used for all of the sites. If it's activated only on some of the sites, the other will not be affected and even the cache storage backend can be different from site to site.
@@ -199,10 +195,6 @@ If the storage engine is either PHP Memcache or PHP Memcached extension, the cre
A short configuration example is generated on the plugin settings page, under `NGiNX` tab according to the saved settings.
**NOTE:** Some features ( most of additional HTTP headers for example, like pingback, shortlink, etc. ) will not be available with this solution.
-= Support =
-I provide support for the plugin as best as I can, but it comes without guarantee.
-Please post feature requests to [WP-FFPC feature request topic](http://wordpress.org/support/topic/feature-requests-14 "WP-FFPC feature request topic") and any questions on the forum.
-
= Contribution =
In order to make contributions a lot easier, I've moved the plugin development to [GitHub](https://github.com/petermolnar/wp-ffpc "GitHub"), feel free to fork and put shiny, new things in it.
@@ -213,3 +205,7 @@ and **at least one** of the following for storage backend:
* PHP APC
* PHP Memcached > 0.1.0
* PHP Memcache > 2.1.0
+
+== Support ==
+I provide support for the plugin as best as I can, but it comes without guarantee.
+Please post feature requests to [WP-FFPC feature request topic](http://wordpress.org/support/topic/feature-requests-14 "WP-FFPC feature request topic") and any questions on the forum.
From 1034e32fa7b4a5c67c712b5887ed5b2d06a0181c Mon Sep 17 00:00:00 2001
From: Peter Molnar
Date: Fri, 22 Mar 2013 12:32:51 +0000
Subject: [PATCH 5/5] readme finalization
---
readme.txt | 53 ++++++++++++++++++++++++++---------------------------
1 file changed, 26 insertions(+), 27 deletions(-)
diff --git a/readme.txt b/readme.txt
index b670fe9..1fda9de 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,14 +1,14 @@
=== WP-FFPC ===
Contributors: cadeyrn
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XU3DG7LLA76WC
-Tags: cache, memcached, full page cache, NGiNX, memcache, page cache
+Tags: cache, page cache, full page cache, nginx, memcached, apc, speed, fast
Requires at least: 3.0
Tested up to: 3.5.1
Stable tag: 1.0
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
-Cache WordPress to memcached and serve them with NGiNX - unbeatable speed!
+Fastest way of cache for WordPress: memcached + nginx!
== Description ==
WP-FFPC ( WordPress Fast Full Page Cache ) is a cache plugin for [WordPress](http://wordpress.org/ "WordPress").
@@ -39,11 +39,35 @@ Thanks for [Hyper Cache](http://wordpress.org/extend/plugins/hyper-cache "Hyper
4. Check the settings in `Settings` ( site or Network Admin, depending on activation wideness ) -> `WP-FFPC` menu in WordPress.
5. Save the settings. THIS STEP IS MANDATORY: without saving the settings, there will be no activated caching!
+= Using the plugin with NGiNX =
+If the storage engine is either PHP Memcache or PHP Memcached extension, the created entries can be read and served directly from NGiNX ( if it has memcache or memc extension )
+A short configuration example is generated on the plugin settings page, under `NGiNX` tab according to the saved settings.
+**NOTE:** Some features ( most of additional HTTP headers for example, like pingback, shortlink, etc. ) will not be available with this solution.
+
== Frequently Asked Questions ==
= How to use the plugin on Amazon Linux? =
You have to remove the default yum package, named `php-pecl-memcache` and install `Memcached` through PECL.
+= How to use the plugin in a WordPress Network =
+From version 1.0, the plugin supports subdomain based WordPress Network with possible different per site cache settings. If the plugin is network active, obviously the network wide settings will be used for all of the sites. If it's activated only on some of the sites, the other will not be affected and even the cache storage backend can be different from site to site.
+
+= What are the plugin's requirements? =
+* WordPress >= 3.0
+
+and **at least one** of the following for storage backend:
+* PHP APC
+* PHP Memcached > 0.1.0
+* PHP Memcache > 2.1.0
+
+= How logging works in the plugin? =
+Log levels ( if logging enabled ) includes warning and error level messages; error level most usually means PHP configuration error or missing plugin configuration.
+Additional info level log is available as additional setting, but if log is disabled, so will info log as well.
+All logs use syslog() PHP function, therefore it's presence is mandatory for loggin functionality.
+
+= How can I contribute? =
+In order to make contributions a lot easier, I've moved the plugin development to [GitHub](https://github.com/petermolnar/wp-ffpc "GitHub"), feel free to fork and put shiny, new things in it and get in touch with me [hello@petermolnar.eu](mailto:hello@petermolnar.eu "hello@petermolnar.eu") when you have it ready.
+
== Screenshots ==
1. settings screen, cache type and basic settings
@@ -181,31 +205,6 @@ There are major problems with the "memcache" driver, the source is yet unkown. T
* first public release
-== Information ==
-
-= Using the plugin in a WordPress Network =
-From version 1.0, the plugin supports subdomain based WordPress Network with possible different per site cache settings. If the plugin is network active, obviously the network wide settings will be used for all of the sites. If it's activated only on some of the sites, the other will not be affected and even the cache storage backend can be different from site to site.
-
-= Log levels =
-Log levels ( if logging enabled ) includes warning and error level messages; error level most usually means PHP configuration error or missing plugin configuration.
-Additional info level log is available as additional setting, but if log is disabled, so will info log as well.
-
-= Using the plugin with NGiNX =
-If the storage engine is either PHP Memcache or PHP Memcached extension, the created entries can be read and served directly from NGiNX ( if it has memcache or memc extension )
-A short configuration example is generated on the plugin settings page, under `NGiNX` tab according to the saved settings.
-**NOTE:** Some features ( most of additional HTTP headers for example, like pingback, shortlink, etc. ) will not be available with this solution.
-
-= Contribution =
-In order to make contributions a lot easier, I've moved the plugin development to [GitHub](https://github.com/petermolnar/wp-ffpc "GitHub"), feel free to fork and put shiny, new things in it.
-
-= Requirements =
-* WordPress >= 3.0
-
-and **at least one** of the following for storage backend:
-* PHP APC
-* PHP Memcached > 0.1.0
-* PHP Memcache > 2.1.0
-
== Support ==
I provide support for the plugin as best as I can, but it comes without guarantee.
Please post feature requests to [WP-FFPC feature request topic](http://wordpress.org/support/topic/feature-requests-14 "WP-FFPC feature request topic") and any questions on the forum.