Support for Cache Consistent

Created on 4 December 2015, about 9 years ago
Updated 16 May 2023, over 1 year ago

Thanks for the great module!

We use Cache Consistent β†’ to handle some issues with Memcache. That module require setting the default cache class to 'ConsistentCache' whereas Acquia Purge ONLY allows Memcache to be used if it is set to MemcacheDrupal:

function _acquia_purge_are_we_using_memcached() {
  static $answer;
  if (is_null($answer)) {
    global $conf;
    $answer = FALSE;

    if (_acquia_purge_variable('acquia_purge_memcache')) {
      if (isset($conf['cache_default_class'])) {
        if ($conf['cache_default_class'] === 'MemCacheDrupal') {
          if (function_exists('dmemcache_get')) {
            $answer = TRUE;
          }
        }
      }
    }
  }
  return $answer;
}

Since Cache Consistent seems to be a transparent, txn-aware wrapper around Memcache, it makes sense to also allow this default class to pass the Memcache test. eg.:

 if ($conf['cache_default_class'] === 'MemCacheDrupal' || ($conf['cache_default_class'] === 'ConsistentCache' && $conf['consistent_cache_default_class'] == MemCacheDrupal)) {

I made this adjustment in our dev environment and it worked as expected. This is much more elegant than relying on the file storage default, which is what happens in our case when using the drop-in replacement class provided by Cache Consistent.

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States torgosPizza Portland, OR

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024