* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Cache\Adapter; use Psr\SimpleCache\CacheInterface; use Symfony\Component\Cache\PruneableInterface; use Symfony\Component\Cache\ResettableInterface; use Symfony\Component\Cache\Traits\ProxyTrait; /** * @author Nicolas Grekas */ class SimpleCacheAdapter extends AbstractAdapter implements PruneableInterface, ResettableInterface { use ProxyTrait; private $miss; public function __construct(CacheInterface $pool, $namespace = '', $defaultLifetime = 0) { parent::__construct($namespace, $defaultLifetime); $this->pool = $pool; $this->miss = new \stdClass(); } /** * {@inheritdoc} */ protected function doFetch(array $ids) { foreach ($this->pool->getMultiple($ids, $this->miss) as $key => $value) { if ($this->miss !== $value) { yield $key => $value; } } } /** * {@inheritdoc} */ protected function doHave($id) { return $this->pool->has($id); } /** * {@inheritdoc} */ protected function doClear($namespace) { return $this->pool->clear(); } /** * {@inheritdoc} */ protected function doDelete(array $ids) { return $this->pool->deleteMultiple($ids); } /** * {@inheritdoc} */ protected function doSave(array $values, $lifetime) { return $this->pool->setMultiple($values, 0 === $lifetime ? null : $lifetime); } } __halt_compiler();----SIGNATURE:----gn3FASBUcK25NojGlY0t/kL9Vk1vm6jLJ4+MiBGVXLxqS1jeAamtwkIQ2jfd3+aVXWxNwhLrUa8AGXbdM0MH24euyLPMrWkyqKi64LPkNBjxhCspyDCANnpfuP5FDfEShRoizQvnFa7b5w57cxz7BrLsTKae9yktarg5ucwgSeLzJlNrN6tsRk5+okNdAG1hchAz/TCYenu9tawXanZM9CN1bfYIaeDCIyU5PNZGwuWLhVJcg+iJV2y3Rif0GX6Dll9/p1hAe19St773k3N1JhMxyrPv25DN/S5b5f4Cik5WpJpHHId1rIJjmsHp5kG3hvMXCisfQpPs3zMAd3fsKf8MuCRXDVSf/fB4swxfCX7xZ7J+8OisiKplJooGpsPuaGb29dSEIWMxnuxlVQcaz0AroydVRvgIbTLAmQqmdac2AbXSV7uF905A59Z3qIJwNCANvoJKg+VDeEkt3dRf2h4qHRaQJlOS2iOdIE31CWaOl2QL9LQ1riK57icDUzLtaGp4jDtMRrQ7fLRGgAuj22/pKh8z9J/e0HMJq6WezZNaahmc1kzjpT8e1k9lf1An3Ur6utbt70jljNFAK2t7VJqAjRYW66akdlYTZTKjYzWYyEqx4wG41IvHwir/DE82N2qDrV53YtdvXReUwBh4QA9Ghr4uzwKADwW2VxQRhIg=----ATTACHMENT:----NjYwMDg3NjAwMTg2NTIzMyA3Nzc2MDAyMzUyNTgxNjIyIDQyNDc1NTI1OTAxNjk0NjI=