MemcachedCache.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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\MemcachedAdapter;
  12. use Symfony\Component\Cache\Marshaller\MarshallerInterface;
  13. use Symfony\Component\Cache\Traits\MemcachedTrait;
  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.', MemcachedCache::class, MemcachedAdapter::class, CacheInterface::class), \E_USER_DEPRECATED);
  16. /**
  17. * @deprecated since Symfony 4.3, use MemcachedAdapter and type-hint for CacheInterface instead.
  18. */
  19. class MemcachedCache extends AbstractCache
  20. {
  21. use MemcachedTrait;
  22. protected $maxIdLength = 250;
  23. public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
  24. {
  25. $this->init($client, $namespace, $defaultLifetime, $marshaller);
  26. }
  27. }