cache/doctrine-adapter

A PSR-6 cache implementation using Doctrine. This implementation supports tags

Package info

github.com/php-cache/doctrine-adapter

Homepage

pkg:composer/cache/doctrine-adapter

Statistics

Installs: 1 098 214

Dependents: 21

Suggesters: 2

Stars: 13

1.2.0 2022-01-15 15:47 UTC

Requires

Requires (Dev)

Suggests

  • ext-apc: Allows for caching with Apc
  • ext-memcache: Allows for caching with Memcache
  • ext-memcached: Allows for caching with Memcached
  • ext-redis: Allows for caching with Redis

Conflicts

None

Replaces

None

MIT 12948d35cb714ea1f5c7d99f0d2d5d022e203b65

cachedoctrinetagpsr-6

This package is auto-updated.

Last update: 2026-06-17 18:07:45 UTC


README

👁 Gitter
👁 Latest Stable Version
👁 codecov.io
👁 Total Downloads
👁 Monthly Downloads
👁 Software License

This is a PSR-6 cache implementation using Doctrine cache. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.

This is a PSR-6 to Doctrine bridge. If you are interested in a Doctrine to PSR-6 bridge you should have a look at PSR-6 Doctrine Bridge.

Install

composer require cache/doctrine-adapter

Use

use Doctrine\Common\Cache\MemcachedCache;
use Cache\Adapter\Doctrine\DoctrineCachePool;


$memcached = new \Memcached();
$memcached->addServer('localhost', 11211);

// Create a instance of Doctrine's MemcachedCache
$doctrineCache = new MemcachedCache();
$doctrineCache->setMemcached($memcached);

// Wrap Doctrine's cache with the PSR-6 adapter
$pool = new DoctrineCachePool($doctrineCache);

Contribute

Contributions are very welcome! Send a pull request to the main repository or report any issues you find on the issue tracker.