aivchen/yii2-simple-cache-adapter

PSR-16 Yii2 Adapter

Installs: 699

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 5

Type:yii2-extension

2.0.0 2023-11-22 21:22 UTC

This package is auto-updated.

Last update: 2024-11-23 01:31:29 UTC


README

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