Using existing drivers

Learn how to use existing cache drivers

This library is abandoned. Please consider using a different library.

We know that there are already a ton of existing cache drivers, so creating a new one will not always make sense.

To use an existing cache driver with Opis Cache all you have to do is to use the Opis\Cache\Drivers\PsrSimpleCacheAdapter adapter class.

use Opis\Cache\Drivers\PsrSimpleCacheAdapter;

$psrCache = new SomeExistingCacheDriver;

$cache = new PsrSimpleCacheAdapter($psrCache);

A list will all PSR16 cache drivers can be found here.