RedisCache.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Cache\Simple;
  11. use Symfony\Component\Cache\Adapter\RedisAdapter;
  12. use Symfony\Component\Cache\Marshaller\MarshallerInterface;
  13. use Symfony\Component\Cache\Traits\RedisTrait;
  14. use Symfony\Contracts\Cache\CacheInterface;
  15. @trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', RedisCache::class, RedisAdapter::class, CacheInterface::class), \E_USER_DEPRECATED);
  16. /**
  17. * @deprecated since Symfony 4.3, use RedisAdapter and type-hint for CacheInterface instead.
  18. */
  19. class RedisCache extends AbstractCache
  20. {
  21. use RedisTrait;
  22. /**
  23. * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redisClient
  24. */
  25. public function __construct($redisClient, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
  26. {
  27. $this->init($redisClient, $namespace, $defaultLifetime, $marshaller);
  28. }
  29. }