Skip to content

Commit

Permalink
Replace Symfony's MemcachedAdapter with MemcachdAdapter
Browse files Browse the repository at this point in the history
The MemcachedAdapter from Symfony was removed and replaced with MemcachdAdapter. This update occurs in the configuration of the CacheItemPoolInterface that is annotated with 'Shared'. Removed redundant import of
  • Loading branch information
koriym committed May 8, 2024
1 parent f29fbd5 commit bcf137a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Psr6MemcachedModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Ray\PsrCacheModule\Annotation\Local;
use Ray\PsrCacheModule\Annotation\MemcacheConfig;
use Ray\PsrCacheModule\Annotation\Shared;
use Symfony\Component\Cache\Adapter\MemcachedAdapter;

use function array_map;
use function explode;
Expand All @@ -35,7 +34,7 @@ public function __construct(string $servers, ?AbstractModule $module = null)
protected function configure(): void
{
$this->bind(CacheItemPoolInterface::class)->annotatedWith(Local::class)->toConstructor(ApcuAdapter::class, ['namespace' => CacheNamespace::class])->in(Scope::SINGLETON);
$this->bind(CacheItemPoolInterface::class)->annotatedWith(Shared::class)->toConstructor(MemcachedAdapter::class, ['namespace' => CacheNamespace::class])->in(Scope::SINGLETON);
$this->bind(CacheItemPoolInterface::class)->annotatedWith(Shared::class)->toConstructor(MemcachdAdapter::class, ['namespace' => CacheNamespace::class])->in(Scope::SINGLETON);
$this->bind()->annotatedWith(MemcacheConfig::class)->toInstance($this->servers);
$this->bind(Memcached::class)->toProvider(MemcachedProvider::class);
$this->bind(ProviderInterface::class)->annotatedWith('memcached')->to(MemcachedProvider::class);
Expand Down

0 comments on commit bcf137a

Please sign in to comment.