Project

General

Profile

Actions

Bug #5836

closed

Memcached caching strategy on new server

Added by Raymond Hoh over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Upgrades
Target version:
Start date:
2016-07-25
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

This isn't really an issue, but thought we needed a space to document this and I didn't want to use the CAC group or an email chain to state this.

On the new server, we have chosen to use Memcached and the WP PECL Memcached Object Cache plugin:
https://github.com/tollmanz/wordpress-pecl-memcached-object-cache

If Memcached is used for other sites (not just the Commons), there is the potential for cache collisions to occur due to the cache key being the same by default.

To fix this, we should define the 'WP_CACHE_KEY_SALT' constant in wp-config.php for each site that is going to use Memcached:
https://github.com/tollmanz/wordpress-pecl-memcached-object-cache/blob/master/object-cache.php#L836

On the dev site for NYCDH.org, I'm using this:

// Memcached object cache unique key
define( 'WP_CACHE_KEY_SALT', DB_NAME . ':dev:' );

Boone, we should probably commit a variation of this for CAC 1.9.22 before the migration takes place. Let me know if you'd prefer a different prefix.

Actions

Also available in: Atom PDF