You are here

private static function MemcacheStorageAPI::normalizeCacheBin in Memcache Storage 7

Removes suffix from cache bin name.

Parameters

$cache_bin: Name of cache bin.

Return value

string Return cache bin name without suffix.

2 calls to MemcacheStorageAPI::normalizeCacheBin()
MemcacheStorageAPI::finalDebugActions in ./memcache_storage.api.inc
Last step of debug logging.
MemcacheStorageAPI::getCacheBinCluster in ./memcache_storage.api.inc
Get name of cluster where cache bin should be stored. Config loads from settings.php.

File

./memcache_storage.api.inc, line 696
Provide class that processes memcached operations.

Class

MemcacheStorageAPI
Integrates with memcache API.

Code

private static function normalizeCacheBin($cache_bin) {
  $cache_bin_suffix = substr($cache_bin, strrpos($cache_bin, '_') + 1);
  if (ctype_digit($cache_bin_suffix)) {
    $cache_bin = substr($cache_bin, 0, strrpos($cache_bin, '_'));
  }
  return $cache_bin;
}