An Adapter for SimpleCache (PSR-16) to Yii2 cache
This library originally developed by devonliu02 and Wearesho Team
composer require aivchen/yii2-simple-cache-adapter
<?php
use Aivchen\SimpleCache;
$adapter = new SimpleCache\Adapter; // will use \Yii::$app->cache by default
$customAdapter = new SimpleCache\Adapter([
'cache' => [
'class' => \yii\caching\ArrayCache::class, // or your custom \yii\caching\CacheInterface implementation
],
]);