public static function DrupalMemcachedDebug::process in Memcache Storage 8
Parameters
$operation: Memcached operation. For example, 'get' or 'set'.
$results: Result of request to memcached.
$memcached_keys: Array which contains memcached key as an array keys and related Drupal cache id as an array values.
$cache_bin: Name of Drupal cache bin.
$cluster_name: Name of the memcached cluster defined in settings.
6 calls to DrupalMemcachedDebug::process()
- DrupalMemcache::deleteMulti in src/
DrupalMemcache.php - Bulk delete from the memcached pool.
- DrupalMemcache::getMulti in src/
DrupalMemcache.php - Get the multiple cache items from the memcached pool.
- DrupalMemcache::setMulti in src/
DrupalMemcache.php - Bulk set if cache items to the memcached pool.
- DrupalMemcached::deleteMulti in src/
DrupalMemcached.php - Bulk delete from the memcached pool.
- DrupalMemcached::getMulti in src/
DrupalMemcached.php - Get the multiple cache items from the memcached pool.
File
- src/
DrupalMemcachedDebug.php, line 146
Class
- DrupalMemcachedDebug
- Class DrupalMemcachedDebug @package Drupal\memcache_storage
Namespace
Drupal\memcache_storageCode
public static function process($operation, $results, $memcached_keys, $cache_bin, $cluster_name) {
$key = 'memcache_storage_' . self::$counter;
$used_time = Timer::read($key);
if (sizeof($memcached_keys) > 1) {
$operation .= 'Multi';
}
foreach ($memcached_keys as $memcached_key => $cache_key) {
$result = $results;
if (in_array($operation, [
'get',
'getMulti',
])) {
$result = isset($results[$memcached_key]) ? TRUE : FALSE;
}
self::$log[] = [
'operation' => $operation,
'used_time' => $used_time,
'result' => $result,
'cache_bin' => $cache_bin,
'cache_key' => $cache_key,
'memcached_key' => $memcached_key,
'cluster_name' => $cluster_name,
];
}
}