GithubHelp home page GithubHelp logo

msigley / wp-simple-redis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pressjitsu/pj-object-cache-red

0.0 1.0 0.0 173 KB

The fastest Redis Object Cache for WordPress you'll find.

Home Page: https://pressjitsu.com/blog/redis-object-cache-wordpress/

PHP 89.18% Shell 10.82%

wp-simple-redis's Introduction

Overview

A highly efficient, predictive and unit tested WordPress object cache backend that implements all available methods using the Redis PECL library.

Why is this fork better?

  • Preloads known cache keys via a single mget() call with lazy unserialization
  • Further microoptimized routines makes this the fastest Redis object cache implementation out there
  • Unit-tested with 100% effective target coverage

For more information check out https://pressjitsu.com/blog/redis-object-cache-wordpress/

Authors

  • Pressjitsu, Inc.
  • Eric Mann
  • Erick Hitter

Installation

  1. Install and configure Redis. There is a good tutorial here.
  2. Install the Redis PECL module or compile from source.
  3. Add object-cache.php to the wp-content directory. It is a drop-in file, not a plugin, so it belongs in the wp-content directory, not the plugins directory.
  4. By default, the script will connect to Redis at 127.0.0.1:6379. See the Connecting to Redis section for further options.

Connecting to Redis

By default, the plugin uses 127.0.0.1 and 6379 as the default host and port when creating a new client instance; the default database of 0 is also used. Three constants are provided to override these default values.

Specify WP_REDIS_BACKEND_HOST, WP_REDIS_BACKEND_PORT, and WP_REDIS_BACKEND_DB to set the necessary, non-default connection values for your Redis instance.

Prefixing Cache Keys

The constant WP_CACHE_KEY_SALT is provided to add a prefix to all cache keys used by the plugin. If running two single instances of WordPress from the same Redis instance, this constant could be used to avoid overlap in cache keys. Note that special handling is not needed for WordPress Multisite.

Support

Support for this plugin can be had over at [email protected]

wp-simple-redis's People

Contributors

ericmann avatar ethitter avatar hans2103 avatar msigley avatar ocean90 avatar pj-dave avatar soulseekah avatar tillkruess avatar

Watchers

 avatar

wp-simple-redis's Issues

Add option for persistant connections

Add option for using persistent connections to the Redis database. This should probably be the default configuration as it is optimal for a local memory cache.

Add alloptions handling

The alloptions cache should be handled using mget to allow the value expiration for each option value to work and to avoid the 'continuous saving bug' cuased by blobing all of the options together in the cache.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.