aivchen / yii2-simple-cache-adapter

An Adapter for SimpleCache(PSR-16) to Yii 2 cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yii2 SimpleCache adapter

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

An Adapter for SimpleCache (PSR-16) to Yii2 cache

This library originally developed by devonliu02 and Wearesho Team

Installation

composer require aivchen/yii2-simple-cache-adapter

Usage

<?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
    ],
]);

Contributors

License

MIT

About

An Adapter for SimpleCache(PSR-16) to Yii 2 cache

License:MIT License


Languages

Language:PHP 100.0%