previewtechs/simple-cache
Composer 安装命令:
composer require previewtechs/simple-cache
包简介
Simple cache library for PHP built on top of PSR-16.
README 文档
README
PHP Cache library built by PSR-16 simple cache interface
You can find implementations of the specification by looking for packages providing the psr/simple-cache-implementation virtual package.
Installation
- Run this command:
composer require previewtechs/simple-cache:dev-master
Usages
- Create a file named
test.phpin your root directory and add these following codes:
<?php require "vendor/autoload.php"; $cache = new Memcached(); $cache->addServers([ ['localhost', 11211, 1] ]); $cache = new Previewtechs\SimpleCache\Memcached($cache); // Set Cache key. $data = [ 'sample' => 'data', 'another' => 'data' ]; $cache->set('your_custom_key', $data); // Check cached key exists or not. $cache->has('your_custom_key'); // Get Cached key data. $cache->get('your_custom_key');
- then run
php test.php
For Documentations
统计信息
- 总下载量: 816
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-10-22