Redis Object Cache – WordPress plugin

Deal Score0
Deal Score0

A persistent object cache backend powered by Redis. Supports Predis, PhpRedis (PECL), Relay, replication, sentinels, clustering and WP-CLI.

To adjust the connection parameters, prefix cache keys or configure replication/clustering, please see our wiki.

Object Cache Pro

A business class Redis object cache backend. Truly reliable, highly optimized, fully customizable and with a dedicated engineer when you most need it.

  • Rewritten for raw performance
  • 100% WordPress API compliant
  • Faster serialization and compression
  • Easy debugging & logging
  • Cache prefetching and analytics
  • Fully unit tested (100% code coverage)
  • Secure connections with TLS
  • Health checks via WordPress & WP CLI
  • Optimized for WooCommerce, Jetpack & Yoast SEO

Learn more about Object Cache Pro.

Connection Parameters

By default the object cache drop-in will connect to Redis over TCP at and select database 0.

To adjust the connection parameters, client, timeouts and intervals, please see the connection parameters wiki page.

Configuration Options

The plugin comes with quite a few configuration options, such as key prefixes, a maximum time-to-live for keys, ignored group and many more.

Please see the configuration options wiki page for a full list.

Replication & Clustering

To use Replication, Sharding or Clustering, make sure your server is running PHP7 or higher and you consulted the Predis or PhpRedis documentation.

Please see the replication & clustering wiki page for more information.

WP-CLI Commands

To see a list of all available WP-CLI commands, please see the WP CLI commands wiki page.

  • Plugin settings, connected to a single Redis server.
  • Plugin settings, displaying recent response time metrics.
  • Plugin settings, showing diagnostic information.
  • Dashboard widget, displaying recent response time metrics.

There are only so many things we can do to (meaningfully) improve the speed of a site:

1. Use a cache app like wprocket.
2. Use a CDN.
3. Use a optimization plugin like perfmatters.
4. Optimize photos manually or with a plugin/service like Imagify
5. Upgrade server

If your like me you’re already utilizing the above techniques yet still find yourself thirsty for more speed, and unable to find it.

Enter Redis and the Redis Object Cache Plugin. Object Cache is a bonafide performance/speed boosting technique, not some gimicky bloaty plugin. In fact the WordPress health check now scans your site for an object cache and returns a health warning/performance reccomendation if your site isn’t using one. If you dont believe me, listen to the professionals!

“Developers report that incorporating object cache cuts down load times by almost half, because each time a query runs it’s stored in a table and delivered much more quickly the next time its data is retrieved.

The plug-in itself is incredibly easy to install and use considering its advanced nature. From WordPress you basically just install the plugin and that’s it. Nothing to configure or tweak you just set it and forget about it.

The server side setup is, naturally, a bit more work, but not difficult. How much work exactly is going to depend on your server and setup, but in general looks like this:

1. Install Redis [sudo apt-get install redis]
2. Edit wp-config: add code snippet and your done See:

If you want to monitor the effect(s) the Redis Object Cache plugin has on your site/server I recommended installing New Relic which will provide you with detailed stats regarding Redis Object Cache’s performance, status, and impact (requires server access).

It’s only the best plugin to integrate Redis Object Cache server on the WordPress website greatly improving the performance!!

Had this plugin running for almost a year now with no issues. Very reliable and solid developer, even sent him a donation and I think you should as well 🙂

I’m using a free version of this plugin for more than a year on a couple of my websites. It works great and I can only say, thanks.

I could not have been happier after installing the Redis Cache pro for our development infrastructure, back-end performance has been outstanding. Thanks again for the great work Till. Keep it coming.

If you’re looking for a solution that is actively pushing the industry forward and is built by some seriously competent engineers – that’s it!

Read all 119 reviews

“Redis Object Cache” is open source software. The following people have contributed to this plugin.



  • Added redis_cache_add_non_persistent_groups filter
  • Fixed wp_add_dashboard_widget parameters
  • Fixed WP_REDIS_SERVERS replication issue with Predis v2.0
  • Fixed WP_REDIS_CLUSTER string support
  • Fixed issue when MGET fails in get_multiple() call
  • Fixed several warnings in the event of pipeline failures





  • Fixed bug in wp_cache_add_multiple() and wp_cache_set_multiple()


  • Fixed and improved wp_cache_*_multiple() logic
  • Call redis_object_cache_set action in wp_cache_set_multiple()
  • Call redis_object_cache_delete action in wp_cache_delete_multiple()
  • Check if raw group name is ignored, not sanitized name
  • Removed tracing


  • Bumped PHP requirement to 7.2
  • Fixed rare fatal error in diagnostics
  • Allow Predis v1.1 Composer installs
  • Support using WP_REDIS_CLUSTER string


  • Bumped PHP requirement to 7.0
  • Deprecated Credis and HHVM clients
  • Updated Predis to v2.0.0
  • Updated Credis to v1.13.1
  • Improved cluster readability in diagnostics
  • Improved connecting to clusters
  • Fixed pinging clusters after connecting
  • Fixed several bugs in connect_using_credis()


  • Fixed a bug in wp_cache_delete_multiple() when using Predis
  • Fixed a bug in wp_cache_add_multiple() when cache addition is suspended


  • Removed broken wp_cache_add_multiple() function


  • Improve metrics label/tooltip formatting
  • Fix metrics chart not rendering
  • Updated Predis to v1.1.10
  • Updated Credis to v1.13.0
  • Support composer/installers v1 and v2
  • Link to settings page when foreign drop-in was found
  • Added wp_cache_flush_runtime() function
  • Added wp_cache_add_multiple() function
  • Added wp_cache_delete_multiple() function


  • Added support for Relay
  • Minor UX fixes and improvements
  • Fixed PHP 8.1 deprecation notice
  • Updated ApexCharts to v3.31.0


  • PHP 8.1 compatibility fixes
  • Upgraded to Predis v1.1.9
  • Added settings link to widget
  • Overhauled diagnostics pane
  • Updated ApexCharts to v3.30.0
  • Redirect to plugin settings after activation
  • Fixed wrong path to diagnostics.php file
  • Fixed chart overflow in settings tab
  • Fixed Predis cluster ping
  • Avoid warning when content folder is not writeable


  • Added metrics diagnostics
  • Added WP_Object_Cache::decr() alias
  • Moved diagnostics.php file



  • Make metric identifier unique
  • Set unique prefix for sites hosted on Cloudways
  • Don’t print HTML debug comment when WP_CLI is true


  • Added redis_object_cache_trace action and WP_REDIS_TRACE constant
  • Updated ApexCharts to v3.26.0
  • Fixed and issue with WP_REDIS_DISABLE_METRICS


  • Code cleanup
  • Fixed missing metrics
  • Fixed filesystem test


  • Updated Credis to v1.11.4
  • Fixed drop-in notice styling
  • Moved metrics into dedicated class
  • Added redis_cache_validate_dropin filter
  • Use WP_DEBUG_DISPLAY (instead of WP_DEBUG) constant to display debug information
  • Fixed rare error in wp_cache_get_multiple()
  • Removed intval() usage


  • Reverted build_key() changes due to issues in multisite environments


  • Made Object Cache Pro card translatable
  • Added WP_REDIS_SERIALIZER to diagnostics
  • Improved speed of build_key()
  • Support settings WP_REDIS_PREFIX and WP_REDIS_SELECTIVE_FLUSH via environment variable
  • Added WP_REDIS_METRICS_MAX_TIME to adjust stored metrics timeframe
  • Delay loading of text domain and schedule until init hook
  • Upgraded bundled Predis library to v1.1.6
  • Prevent variable referencing issue in connect_using_credis()


  • Updated bundled Predis library to v1.1.4
  • Made redis-cache a global group for improved metrics on multisite
  • Switched to short array syntax
  • Added @since tags to all hooks
  • Use parse_url() instead of wp_parse_url() in drop-in
  • Fixed plugin instance variable name in wp redis status


  • Fixed bytes metrics calculation
  • Fixed an issue with non-standard Predis configurations
  • Improve WordPress Coding Standards


  • Fixed an issue in wp_cache_get_multiple() when using Predis
  • Prevent undefined index notice in diagnostics


  • Fixed unserializing values in wp_cache_get_multiple()


  • Highlight current metric type using color
  • Show “Metrics” tab when metrics are disabled
  • Refactored connection and Redis status logic
  • Updated Predis to v1.1.2
  • Remove Predis deprecation notice
  • Fixed fetching derived keys in wp_cache_get_multiple()


  • Fixed tabs not working in 2.0.6 and 2.0.7 due to SVN issue


  • Fixed issue with wp_cache_get_multiple()


  • Added experimental filesystem test to diagnostics
  • Refactored settings tab logic (fixed jumping, too)
  • Fixed issues with wp_cache_get_multiple()
  • Return boolean from wp_cache_delete()
  • Use redis-cache as JS event namespace
  • Hide Pro line in widget when banners are disabled
  • Renamed redis_object_cache_get_multi action to redis_object_cache_get_multiple


Version 2.0 is a significant rewrite of the plugin. Please read the v2.0.0 release notes.

  • Fixed multisite action buttons not working
  • Removed outdated PHP 5.4 warning
  • Added read_timeout support to Credis
  • Display connection parameters when using Credis
  • Added wiki link to Predis upgrade notice


  • Attempt to reliably update the dropin when it’s outdated
  • Show ACL username on settings screen
  • Show full diagnostics with wp redis status
  • Always set FS_CHMOD_FILE when copying the object-cache.php
  • Don’t encode bullets in password diagnostics
  • Call redis_object_cache_update_dropin during dropin update


  • Hide “Metrics” tab when metrics are disabled
  • Fixed admin.js not loading in multisite environments
  • Avoid fatal error when interacting with metrics but Redis went away
  • Added WP_Object_Cache::__get() for backwards compatibility


  • Updated POT file and comments for translators


  • Support older versions of Query Monitor
  • Made “Dropin” status more helpful
  • Hide Redis version in settings when it isn’t available
  • Collapsed dependency paths using composer-custom-directory-installer package
  • Prevent QM_Collector conflicts with other plugins
  • Prevent metric issues when cache is not available
  • Fixed “Settings” link in plugin list
  • Fixed WP_REDIS_DISABLED logic


Version 2.0 is a significant rewrite. The plugin now requires PHP 5.6, just like WordPress 5.2 does.

The GitHub and Composer repository was moved from tillkruss/redis-cache to rhubarbgroup/redis-cache.

On multisite networks, be sure to “Network Activate” the plugin after upgrading to v2.x.

  • Require PHP 5.6
  • Plugin is now “network-only”
  • Switch to WPCS for code standards
  • Overhauled the settings screen
  • Added object cache metrics (on dashboard widget and settings)
  • Added support for Query Monitor
  • Added RhubarbRedisCache namespace to all files
  • Added support for WP 5.5’s new wp_cache_get_multi() function
  • Added redis_object_cache() function to retrieve plugin instance
  • Added dropin warnings to network dashboard
  • Added support for setting Sentinel database numbers
  • Support Redis 6 ACL username and password authentication
  • Support overwriting existing dropin on setting screen
  • Use singleton pattern to instantiate plugin
  • Use Composer to install and load Predis
  • Update object cache dropin during plugin update
  • Use separate methods to connect with all clients
  • Added themes as ignored group
  • Changed default connection and read timeout to 1 second
  • Prevent race condition in add_or_replace()
  • Renamed WP_CACHE_KEY_SALT to WP_REDIS_PREFIX for clarity
  • Replaced “slave” terminology with “replica”
  • Only SELECT database when it’s not 0


  • Fixed issue with footer comment showing during AJAX requests


  • Improved group name sanitization (thanks @naxvog)
  • Prevent fatal error when replacing foreign dropin
  • Added HTML footer comment with optional debug information
  • Removed prefix suggestions

The HTML footer comment only prints debug information when WP_DEBUG is enabled. To disable the comment entirely, set the WP_REDIS_DISABLE_COMMENT constant to true.


  • Fixed missing $info variable assignment in constructor
  • Fixed MaxTTL warning condition
  • Switched to using default button styles


  • Added warning message about invalid MaxTTL
  • Added warning about unmaintained Predis library
  • Added suggestion about shorter, human-readable prefixes
  • Added Redis Cache Pro compatibility to settings
  • Fixed flushing the cache when the prefix contains special characters
  • Fixed calling Redis INFO when using clusters
  • Cleaned up the settings a little bit


  • Added support for PhpRedis TLS connections
  • Added support for timeout, read timeout and password when using PhpRedis cluster
  • Fixed issue with INFO command
  • Fixed object cloning when setting cache keys


  • Added object cloning to in-memory cache
  • Fixed PHP notice related to read_timeout parameter


Please flush the object cache after updating the drop to v1.5.5 to avoid dead keys filling up Redis memory.

  • Removed lowercasing keys
  • Remove scheduled metrics event
  • Fixed Redis version call when using replication



  • Fixed: Call to undefined function get_plugin_data()
  • Fixed: Call to undefined method WP_Object_Cache::redis_version()


  • Added Redis version to diagnostics
  • Added WP_REDIS_DISABLE_BANNERS constant to disable promotions
  • Fixed an issue with redis.replicate_commands()


This plugin turned 5 years today (Nov 14th) and its only fitting to release the business edition today as well.
Object Cache Pro is a truly reliable, highly optimized and easy to debug rewrite of this plugin for SMBs.

  • Added execution times to actions
  • Added WP_REDIS_VERSION constant
  • Fixed PhpRedis v3 compatibility
  • Fixed an issue with selective flushing
  • Fixed an issue with mb_* functions not existing
  • Replaced Email Address Encoder card with Redis Cache Pro card
  • Gather version metrics for better decision making


Since Predis isn’t maintained any longer, it’s highly recommended to switch over to PhpRedis (the Redis PECL extension).

  • Improved Redis key name builder
  • Added support for PhpRedis serializers
  • Added redis_object_cache_error action
  • Added timeout, read-timeout and retry configuration
  • Added unflushable groups (defaults to ['userlogins'])
  • Fixed passwords not showing in server list


  • Require PHP 5.4 or newer
  • Use pretty print in diagnostics
  • Throw exception if Redis library is missing
  • Fixed cache not flushing for some users
  • Fixed admin issues when WP_REDIS_DISABLED is false


  • Added graceful Redis failures and WP_REDIS_GRACEFUL constant
  • Improved cluster support
  • Added redis_cache_expiration filter
  • Renamed redis_object_cache_get filter to redis_object_cache_get_value


  • Fixed potential fatal error related to wp_suspend_cache_addition()


  • Added support for igbinary
  • Added support for wp_suspend_cache_addition()


  • Fixed WP_REDIS_SHARDS not showing up in server list
  • Fixed WP_REDIS_SHARDS not working when using PECL extension
  • Removed WP_REDIS_SCHEME and WP_REDIS_PATH leftovers


  • Switched from single file Predis version to full library


  • Revert back to single file Predis version


  • Added support for Redis Sentinel
  • Added support for sharing
  • Switched to PHAR version of Predis
  • Improved diagnostics
  • Added $fail_gracefully parameter to WP_Object_Cache::__construct()
  • Always enforce WP_REDIS_MAXTTL
  • Pass $selective and $salt to redis_object_cache_flush action
  • Don’t set WP_CACHE_KEY_SALT constant


  • Added basic diagnostics to admin interface
  • Added WP_REDIS_DISABLED constant to disable cache at runtime
  • Prevent “Invalid plugin header” error
  • Return integer from increment() and decrement() methods
  • Prevent object cache from being instantiated more than once
  • Always separate cache key prefix and group by semicolon
  • Improved performance of build_key()
  • Only apply redis_object_cache_get filter if callbacks have been registered
  • Fixed add_or_replace() to only set cache key if it doesn’t exist
  • Added redis_object_cache_flush action
  • Added redis_object_cache_enable action
  • Added redis_object_cache_disable action
  • Added redis_object_cache_update_dropin action


  • Added WP-CLI support
  • Show host and port unless scheme is unix
  • Updated default global and ignored groups
  • Do a cache flush when activating, deactivating and uninstalling


  • Updated Predis to v1.1.1
  • Added redis_instance() method
  • Added incr() method alias for Batcache compatibility
  • Added redis_object_cache_delete action
  • Use WP_PLUGIN_DIR with WP_CONTENT_DIR as fallback
  • Set password when using a cluster or replication
  • Show Redis client in stats()
  • Change visibility of $cache to public
  • Use old array syntax, just in case


  • Make sure $result is not false in WP_Object_Cache::get()



  • New admin interface
  • Added support for wp_cache_get()‘s $force and $found parameter
  • Added support for clustering and replication with Predis



  • Added redis_object_cache_set action
  • Added redis_object_cache_get action and filter
  • Prevented duplicated admin status messages
  • Load bundled Predis library only if necessary
  • Load bundled Predis library using WP_CONTENT_DIR constant
  • Updated stats() method output to be uniform with WordPress


  • Added composer.json
  • Added deactivation and uninstall hooks to delete object-cache.php
  • Added local serialization functions for better advanced-cache.php support
  • Updated bundled Predis version to 1.0.3
  • Updated heading structure to be semantic


  • Added Multisite support
  • Moved admin menu under Settings menu
  • Fixed PHP notice in get_redis_client_name()


  • Call select() and optionally auth() if HHVM extension is used


  • Added support for HHVM’s Redis extension
  • Added support for PECL Redis extension
  • Added WP_REDIS_CLIENT constant, to set preferred Redis client
  • Added WP_REDIS_MAXTTL constant, to force expiration of cache keys
  • Improved add_or_replace(), get(), set() and delete() methods
  • Improved admin screen styles
  • Removed all internationalization/localization from drop-in


  • Added “Flush Cache” button
  • Added support for UNIX domain sockets
  • Improved cache object retrieval performance significantly
  • Updated bundled Predis library to version 1.0.1


  • Load plugin translations
  • Hide global admin notices from non-admin users
  • Prevent direct file access to redis-cache.php and admin-page.php
  • Colorize “Disable Object Cache” button
  • Call PredisClient->connect() to avoid potential uncaught PredisConnectionConnectionException


Source link

We will be happy to hear your thoughts

      Leave a reply

      Wordpress Tutorials, Tips, Themes and Plugins.
      Register New Account
      Reset Password
      Shopping cart