summaryrefslogtreecommitdiff
path: root/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/cache/Adapter/SimpleCacheAdapter.php')
-rw-r--r--vendor/symfony/cache/Adapter/SimpleCacheAdapter.php63
1 files changed, 3 insertions, 60 deletions
diff --git a/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php b/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php
index 5a836a3dbf..d0d42e57f0 100644
--- a/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php
+++ b/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php
@@ -11,68 +11,11 @@
namespace Symfony\Component\Cache\Adapter;
-use Psr\SimpleCache\CacheInterface;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\Traits\ProxyTrait;
+@trigger_error(sprintf('The "%s" class is @deprecated since Symfony 4.3, use "Psr16Adapter" instead.', SimpleCacheAdapter::class), E_USER_DEPRECATED);
/**
- * @author Nicolas Grekas <p@tchwork.com>
+ * @deprecated since Symfony 4.3, use Psr16Adapter instead.
*/
-class SimpleCacheAdapter extends AbstractAdapter implements PruneableInterface
+class SimpleCacheAdapter extends Psr16Adapter
{
- use ProxyTrait;
-
- private $miss;
-
- public function __construct(CacheInterface $pool, string $namespace = '', int $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);
- }
}