Skip to content

Commit

Permalink
Merge pull request #29 from pantheon-systems/readme-updates-0-2-0
Browse files Browse the repository at this point in the history
Readme updates for v0.2.0
  • Loading branch information
Josh Koenig committed Nov 17, 2015
2 parents bc4a3ec + a35ba47 commit 3c97e9c
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
node_modules/
phpredis
38 changes: 38 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = function( grunt ) {

'use strict';
// Project configuration
grunt.initConfig( {

pkg: grunt.file.readJSON( 'package.json' ),

wp_readme_to_markdown: {
options: {
screenshot_url: 'https://s.w.org/plugins/{plugin}/{screenshot}.png',
},
your_target: {
files: {
'README.md': 'readme.txt'
}
},
},

phpcs: {
plugin: {
src: './'
},
options: {
bin: "vendor/bin/phpcs --extensions=php --ignore=\"*/vendor/*,*/node_modules/*\"",
standard: "phpcs.ruleset.xml"
}
},

} );

grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
grunt.loadNpmTasks( 'grunt-phpcs' );
grunt.registerTask( 'readme', ['wp_readme_to_markdown']);

grunt.util.linefeed = '\n';

};
68 changes: 53 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,64 @@
# WP Redis <img align="right" src="https://travis-ci.org/pantheon-systems/wp-redis.png?branch=master" />
# WP Redis #
**Contributors:** getpantheon, danielbachhuber, mboynes, Outlandish Josh
**Tags:** cache, plugin
**Requires at least:** 3.0.1
**Tested up to:** 4.4
**Compatible up to:** 4.1
**Stable tag:** 0.2.0
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

WordPress Object Cache using Redis. By Pantheon and Alley Interactive.
Back your WP Object Cache with Redis, a high-performance in-memory storage backend.

Pre-requisites
--------------
[![Build Status](https://travis-ci.org/pantheon-systems/wp-redis.svg?branch=master)](https://travis-ci.org/pantheon-systems/wp-redis)

* [redis](http://redis.io/)
* [phpredis](https://github.com/nicolasff/phpredis)
## Description ##

or
For sites concerned with high traffic, speed for logged-in users, or dynamic pageloads, a high-speed and persistent object cache is a must. You also need something that can scale across multiple instances of your application, so using local file caches or APC are out.

* [pantheon](https://www.getpantheon.com)
Redis is a great answer, and one we bundle on the Pantheon platform. This is our plugin for integrating with the cache, but you can use it on any self-hosted WordPress site if you have Redis.

Setup
-----
Go forth and make awesome!

1. Install `object-cache.php` to the `wp-content/object-cache.php`.
2. In your `wp-config.php` file, add your server credentials:
## Installation ##

$redis_server = array( 'host' => '127.0.0.1', 'port' => 6379, 'auth' => '12345' );
This assumes you have a PHP environment with the required Redis library and a working Redis server (e.g. Pantheon).

On Pantheon this setting is not necessary.
3. Engage thrusters: you are now backing WP's object cache with Redis.
1. Install `object-cache.php` to `wp-content/object-cache.php` with a symlink or by copying the file.
2. If you're not running on Pantheon, edit wp-config.php to add your cache credentials, e.g.:

$redis_server = array( 'host' => '127.0.0.1',
'port' => 6379,
'auth' => '12345' );

3. Engage thrusters: you are now backing WP's Object Cache with Redis.

## Frequently Asked Questions ##

### Why would I want to use this plugin? ###

If you are concerned with the speed of your site, backing it with a high-performance, persistent object cache can have a huge impact. It takes load off your database, and is faster for loading all the data objects WordPress needs to run.

### How does this work with other caching plugins? ###

This plugin is for the internal application object cache. It doesn't have anything to do with page caches. On Pantheon you do not need additional page caching, but if you are self-hosted you can use your favorite page cache plugins in conjunction with WP Redis.

### How can I contribute? ###

The best way to contribute to the development of this plugin is by participating on the GitHub project:

https://github.com/pantheon-systems/wp-redis

Pull requests and issues are welcome!

## Changelog ##

### 0.2.0 (November 17, 2015) ###

* Gracefully fails back to the WordPress object cache when Redis is unavailable or intermittent. Previously, WP Redis would hard fatal.
* Triggers a PHP error if Redis goes away mid-request, for you to monitor in your logs. Attempts one reconnect based on specific error messages.
* Forces a flushAll on Redis when Redis comes back after failing. This behavior can be disabled with the `WP_REDIS_DISABLE_FAILBACK_FLUSH` constant.
* Show an admin notice when Redis is unavailable but is expected to be.

### 0.1 ###
* Initial commit of working code for the benefit of all.
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "wp-redis",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "https://github.com/pantheon-systems/wp-redis.git"
},
"main": "Gruntfile.js",
"author": "Pantheon <[email protected]>",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-phpcs": "^0.4.0",
"grunt-wp-readme-to-markdown": "~1.0.0"
}
}
37 changes: 24 additions & 13 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
Contributors: getpantheon, danielbachhuber, mboynes, Outlandish Josh
Tags: cache, plugin
Requires at least: 3.0.1
Tested up to: 4.1
Tested up to: 4.4
Compatible up to: 4.1
Stable tag: 0.1
Stable tag: 0.2.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Back your WP Object cache with Redis, a high-performance in-memory cache.
Back your WP Object Cache with Redis, a high-performance in-memory storage backend.

[![Build Status](https://travis-ci.org/pantheon-systems/wp-redis.svg?branch=master)](https://travis-ci.org/pantheon-systems/wp-redis)

== Description ==

For sites concerned with high traffic and speed for logged in users or dynamic pageloads, a performant object cache is a must. You also need something that can scale across multiple instances of your application, so a local file cache and APC are out.
For sites concerned with high traffic, speed for logged-in users, or dynamic pageloads, a high-speed and persistent object cache is a must. You also need something that can scale across multiple instances of your application, so using local file caches or APC are out.

Redis is a great answer, and one we bundle on the Pantheon platform. This is our plugin for integrating with the cache, but you can use it on any self-hosted WordPress site if you have Redis.

Expand All @@ -22,32 +24,41 @@ Go forth and make awesome!

This assumes you have a PHP environment with the required Redis library and a working Redis server (e.g. Pantheon).

1. Install `object-cache.php` to the `wp-content/object-cache.php`.
2. If you're not running on Pantheon, edit wp-config to add your cache credentials:
1. Install `object-cache.php` to `wp-content/object-cache.php` with a symlink or by copying the file.
2. If you're not running on Pantheon, edit wp-config.php to add your cache credentials, e.g.:

$redis_server = array( 'host' => '127.0.0.1',
'port' => 6379,
'auth' => '12345' );

3. Engage thrusters: you are now backing WP's object cache with Redis.
3. Engage thrusters: you are now backing WP's Object Cache with Redis.

== Frequently Asked Questions ==

= Why would I want to use this plugin? =

If you are concerned with the speed of your site, backing it with a high-performance object cache can have a big effect. It takes load off your database, and is faster for loading all the data objects WordPress needs to run.
If you are concerned with the speed of your site, backing it with a high-performance, persistent object cache can have a huge impact. It takes load off your database, and is faster for loading all the data objects WordPress needs to run.

= How does this work with other caching plugins? =

This plugin is for the internal application object cache. It doesn't have anything to do with page caches. On Pantheon you do not need attitional page cacheing, but if you are self-hosting you can use your favorite page cache plugins in conjunction with wp-redis.
This plugin is for the internal application object cache. It doesn't have anything to do with page caches. On Pantheon you do not need additional page caching, but if you are self-hosted you can use your favorite page cache plugins in conjunction with WP Redis.

= How can I contribute? =

The best way to contribute to the development of this plugin is by participating on the GitHub project:

== Screenshots ==
https://github.com/pantheon-systems/wp-redis

Coming soon.
Pull requests and issues are welcome!

== Changelog ==

= 0.2.0 (November 17, 2015) =

* Gracefully fails back to the WordPress object cache when Redis is unavailable or intermittent. Previously, WP Redis would hard fatal.
* Triggers a PHP error if Redis goes away mid-request, for you to monitor in your logs. Attempts one reconnect based on specific error messages.
* Forces a flushAll on Redis when Redis comes back after failing. This behavior can be disabled with the `WP_REDIS_DISABLE_FAILBACK_FLUSH` constant.
* Show an admin notice when Redis is unavailable but is expected to be.

= 0.1 =
* Initial commit of working code for the benefit of all.

== Upgrade Notice ==
28 changes: 14 additions & 14 deletions wp-redis.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?php
/*
Plugin Name: WP Redis
Plugin URI: http://github.com/alleyinteractive/wp-redis/
Plugin URI: http://github.com/pantheon-systems/wp-redis/
Description: WordPress Object Cache using Redis. Requires phpredis (https://github.com/nicolasff/phpredis).
Version: 0.1
Author: Matthew Boynes, Alley Interactive
Author URI: http://www.alleyinteractive.com/
Version: 0.2.0
Author: Pantheon, Josh Koenig, Matthew Boynes, Daniel Bachhuber Alley Interactive
Author URI: https://pantheon.io/
*/
/* This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

0 comments on commit 3c97e9c

Please sign in to comment.