*/
private $memcache;
+ /**
+ * @param string $memcache_host
+ * @param int $memcache_port
+ * @throws Exception
+ */
public function __construct($memcache_host, $memcache_port)
{
if (!class_exists('Memcache', false)) {
}
}
+ /**
+ * (@inheritdoc)
+ */
+ public function getAllKeys()
+ {
+ $list = [];
+ $allSlabs = $this->memcache->getExtendedStats('slabs');
+ foreach($allSlabs as $slabs) {
+ foreach(array_keys($slabs) as $slabId) {
+ $cachedump = $this->memcache->getExtendedStats('cachedump', (int)$slabId);
+ foreach($cachedump as $keys => $arrVal) {
+ if (!is_array($arrVal)) {
+ continue;
+ }
+ $list = array_merge($list, array_keys($arrVal));
+ }
+ }
+ }
+
+ return $list;
+ }
+
/**
* (@inheritdoc)
*/