Memcached vs Redis

Somebody can share your tests with Redis and Mecached in a server with multiple WordPress instalations?

  • Issues
  • Benchmarking and Performance
  • Plugins and configuration for use in multiple WordPress install into same server ( If you don’t know, it’s necessary to setup prefix for isolate Redis or Memcached )

Hi,

If you google both you will find a lot articles en benchmarks. For most WordPress users is usability more important than a few percent of better performance. Don’t you think?

Yes that’s important if you host multiple sites on one server. In this case you need to add these variables to your wp-config.php file (if you use the Redis Object Cache plugin from Till Kruss)

define( 'WP_REDIS_PREFIX', 'my_prefix' );
define( 'WP_REDIS_DATABASE', 5 ); // 0-15

I use this for prefix:

define('WP_CACHE_KEY_SALT', DB_NAME ); 

Using DB_NAME constant is more easy then create a randon prefix and works in any WP instalation.
I had see some topics in the WP plugin directory about it. WP_CACHE_KEY_SALT works like WP_REDIS_DATABASE.

Check this forum post too, Till explains here how both constants are used:

1 Like

When i typing this post, i confused WP_REDIS_PREFIX with WP_REDIS_DATABASE.
To prevent issues, i use:

define('WP_CACHE_KEY_SALT', DB_NAME );
define('WP_REDIS_DATABASE', 1); // 0-15 or other number since it has been configurated in the redis server config