@param array $keys

@return string
422096
protected function getSync(array $keys)
    {
        return sprintf(
'<div id="block-cms-%s" >
    <script>
        /*<![CDATA[*/
            (function () {
                var block, xhr;
                block = document.getElementById("block-cms-%s");
                if (window.XMLHttpRequest) {
                    xhr = new XMLHttpRequest();
                } else {
                    xhr = new ActiveXObject("Microsoft.XMLHTTP");
                }

                xhr.open("GET", "%s", false);
                xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
                xhr.send("");

                // create an empty element
                var div = document.createElement("div");
                div.innerHTML = xhr.responseText;

                for (var node in div.childNodes) {
                    if (div.childNodes[node] && div.childNodes[node].nodeType == 1) {
                        block.parentNode.replaceChild(div.childNodes[node], block);
                    }
                }
            })();
        /*]]>*/
    </script>
</div>', $keys['block_id'], $keys['block_id'], $this->router->generate('sonata_page_js_sync_cache', $keys, UrlGeneratorInterface::ABSOLUTE_URL));
    }
1087678
public function replaceKeys(array $keys): self
    {
        $values = \array_values($this->getArray());
        $result = \array_combine($keys, $values);

        return static::create(
            $result,
            $this->iteratorClass,
            false
        );
    }
1332584
public function getMany($keys)
    {
        if (!is_array($keys))
            $keys = func_get_args();

        $newArray = array();

        foreach($keys as $key) {
            if (isset($this->_data[$key])) {
                $newArray[$key] = $this->_data[$key];
            }
        }

        return $newArray;
    }
573857
public static function fromKeys($keys){
        $hash = new Dictionary();
        foreach($keys as $key){
            $hash[$key] = NULL;
        }
        return $hash;
    }
216478
private function validateKeys(array $keys)
    {
        foreach ($keys as $key) {
            $key = (string)$key;
            $this->validateKey($key);
        }
    }
837070
public function forgetMany(array $keys)
    {
        $this->connection()->del($this->prefixKeys($keys));

        return array_fill_keys($keys, true);
    }
1226193
public function getNamesByKey($keys)
    {
        if (empty($keys)) {
            return [];
        }

        return $this->whereIn($this->getKeyName(), $keys)
                    ->select('name')->get()
                    ->pluck('name')->all();
    }
1263243
public function getMany(array $keys)
    {
        $values = $this->connection()->mget($this->prefixKeys($keys));

        return array_combine($keys, array_map(function ($value) {
            return is_numeric($value) ? $value : unserialize($value);
        }, $values));
    }
1305632
protected function getAsync(array $keys)
    {
        return sprintf(
'<div id="block-cms-%s" >
    <script>
        /*<![CDATA[*/
            (function() {
                var b = document.createElement("script");
                b.type = "text/javascript";
                b.async = true;
                b.src = "%s";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(b, s);
            })();

        /*]]>*/
    </script>
</div>', $keys['block_id'], $this->router->generate('sonata_page_js_async_cache', $keys, UrlGeneratorInterface::ABSOLUTE_URL));
    }
627792
public function many(array $keys)
    {
        $prefixedKeys = array_map(function ($key) {
            return $this->prefix.$key;
        }, $keys);

        if ($this->onVersionThree) {
            $values = $this->memcached->getMulti($prefixedKeys, Memcached::GET_PRESERVE_ORDER);
        } else {
            $null = null;

            $values = $this->memcached->getMulti($prefixedKeys, $null, Memcached::GET_PRESERVE_ORDER);
        }

        if ($this->memcached->getResultCode() != 0) {
            return array_fill_keys($keys, null);
        }

        return array_combine($keys, $values);
    }
1290768
protected function read(array $keys)
    {
        $_res = array();
        $res = apc_fetch($keys);
        foreach ($res as $k => $v) {
            $_res[$k] = $v;
        }

        return $_res;
    }
115449
public static function fromKeys($keys)
    {
        $hash = new static();
        foreach ($keys as $key) {
            $hash[$key] = null;
        }

        return $hash;
    }
518525
public static function GetLowest ($array, $keys) {
		foreach ((array) $keys as $key) {
			if (isset($array[$key]) || array_key_exists($key, $array)) {
				$array = $array[$key];
			} else {
				return null;
			}
		}
		return $array;
	}
1157789
protected function getParameters(array $keys)
    {
        $parameters = [];

        foreach ($keys as $parameterKey => $default) {
            $parameters[$parameterKey] = $this->get($parameterKey, $default);
        }

        return $parameters;
    }
390628
public function strip(array $keys) : Assoc
    {
        return $this->pipe(
            function (array $values) use ($keys) : array {
                foreach ($keys as $key) {
                    if (isset($values[$key])) {
                        unset($values[$key]);
                    }
                }

                return $values;
            }
        );
    }
954747
protected function checkSameSlotForKeys(array $keys)
    {
        if (!$count = count($keys)) {
            return false;
        }

        $currentSlot = $this->getSlotByKey($keys[0]);

        for ($i = 1; $i < $count; ++$i) {
            $nextSlot = $this->getSlotByKey($keys[$i]);

            if ($currentSlot !== $nextSlot) {
                return false;
            }

            $currentSlot = $nextSlot;
        }

        return true;
    }
807495
public function createCacheKey($keys) {
        if (is_array($keys)) {
            $key = array_shift($keys);

            if ($keys) {
                foreach ($keys as $value) {
                    if (is_array($value)) {
                        $key .= '-' . md5(json_encode($value));
                    } else if ($value) {
                        $key .= '-' . $value;
                    }
                }
            }
        } else {
            $key = $keys;
        }

        return (string) $key;
    }