From a0c85fb3781c474bd8769fe83cb564e64383ae86 Mon Sep 17 00:00:00 2001 From: Erick Hitter Date: Wed, 26 Feb 2014 14:05:28 -0800 Subject: [PATCH] Updates to documentation indicating this is a proper fork. Probably needs a new name. --- index-wp-redis.php | 2 +- wp-redis-cache/wp-redis-cache.php | 121 ++++-------------------------- 2 files changed, 16 insertions(+), 107 deletions(-) diff --git a/index-wp-redis.php b/index-wp-redis.php index ec821f0..369a4c7 100644 --- a/index-wp-redis.php +++ b/index-wp-redis.php @@ -327,7 +327,7 @@ try { if ( $wp_redis_cache_config['debug'] ) { $end = microtime(); $time = @wp_redis_cache_get_micro_time( $end ) - @wp_redis_cache_get_micro_time( $start ); - $wp_redis_cache_config['debug_messages'] .= "\n"; + $wp_redis_cache_config['debug_messages'] .= "\n"; $wp_redis_cache_config['debug_messages'] .= "\n"; if ( isset( $wp_redis_cache_config['cache_duration'] ) ) { $wp_redis_cache_config['debug_messages'] .= "\n"; diff --git a/wp-redis-cache/wp-redis-cache.php b/wp-redis-cache/wp-redis-cache.php index 6020f61..4da7a70 100644 --- a/wp-redis-cache/wp-redis-cache.php +++ b/wp-redis-cache/wp-redis-cache.php @@ -1,117 +1,26 @@ -``` -In `index-wp-redis.php` change `$server_ip` to the IP of your server - -*Note: Sometimes when you upgrade WordPress it will replace over your `index.php` file and you will have to redo this step. This is the reason we don't just replace the contents of `index-wp-redis.php` with `index.php`. - -We do this because WordPress is no longer in charge of displaying our posts. Redis will now server the post if it is in the cache. If the post is not in the Redis cache it will then call WordPress to serve the page and then cache it for the next pageload - - -### Benchmark ------- -I welcome you to compare the page load times of this caching system with other popular Caching plugins such as [WP Super Cache](http://wordpress.org/plugins/wp-super-cache/) and [W3 Total Cache](http://wordpress.org/plugins/w3-total-cache/) - -With a fresh WordPress install: - -WP Super Cache -``` -Page generated in 0.318 seconds. -``` - -W3 Total Cache -``` -Page generated in 0.30484 seconds. -``` - -WP Redis Cache -``` -Page generated in 0.00902 seconds. -``` - - -== Installation == - -== Installation == ------- -Install Redis, must have root access to your machine. On debian it's as simple as: -```bash -sudo apt-get install redis-server -``` -On other systems please refer to the [Redis website](http://redis.io/). - -Move the folder wp-redis-cache to the plugin directory and activate the plugin. In the admin section you can set how long you will cache the post for. By default it will cache the post for 12 hours. -Note: This plugin is optional and is used to refresh the cache after you update a post/page - -Move the `index-wp-redis.php` to the root/base WordPress directory. - -Move the `index.php` to the root/base WordPress directory. Or manually change the `index.php` to: - -```php - -``` -In `index-wp-redis.php` change `$ip_of_your_website` to the IP of your server - -*Note: Sometimes when you upgrade WordPress it will replace over your `index.php` file and you will have to redo this step. This is the reason we don't just replace the contents of `index-wp-redis.php` with `index.php`. - -We do this because WordPress is no longer in charge of displaying our posts. Redis will now server the post if it is in the cache. If the post is not in the Redis cache it will then call WordPress to serve the page and then cache it for the next pageload - -/* Copyright 2013 Benjamin Adams (email : ben@dudelol.com) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License, version 2, as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -- GitLab