Get support for michaelcullum/psr-6-doctrine-bridge

If you're new to LTH, please see our FAQ for more information on what it is we do.

Support Options

Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:

View Open Issues

Take a look to see if anyone else has experienced the same issue as you and if they managed to solve it.

Open an Issue

Make sure to read any relevant guidelines for opening issues on this repo before posting a new issue.

Sponsor directly

Check out the page and see if there are any options to sponsor this project or it's developers directly.

michaelcullum/psr-6-doctrine-bridge

psr-6-doctrine-bridge

PSR-6 Compliant Doctrine Bridge

This library provides a PSR-6 compliant cache implementation, and it also provides a bridge between Doctrine, and the Cache Pool

To use the doctrine bridge, follow the instructions below, in the Usage section.

Installation

Todo

Usage

To use the cache pool

use Aequasi\Cache\CachePool;
use Doctrine\Common\Cache\RedisCache;

$predisClient = new \Predis\Client();
$cache        = new RedisCache($predisClient);
$pool         = new CachePool($cache);

$pool->getItem($key);
$pool->hasItem($key);
$pool->deleteItem($key);
$pool->save($cacheItem);

To use the Doctrine Bridge:

Note: This allows you to use an instance of the Doctrine\Common\Cache\Cache interface, while being PSR-6 compliant. This is useful for projects that require an implementation of Doctrine\Common\Cache\Cache, but you still wan't to use PSR-6

use Aequasi\Cache\CachePool;
use Aequasi\Cache\DoctrineBridge;
use Doctrine\Common\Cache\RedisCache;

$predisClient  = new \Predis\Client();
$cache         = new RedisCache($predisClient);
$pool          = new CachePool($cache);
$cacheProvider = new DoctrineBridge($pool);

$cacheProvider->contains($key);
$cacheProvider->fetch($key);
$cacheProvider->save($key, $value, $ttl);
$cacheProvider->delete($key);

// Also, if you need it:
$cacheProvider->getPool(); // same as $pool
Our Mission

We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.

Interesting Articles

Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated

p-e622a1a2