renpengpeng/php-cache
Composer 安装命令:
composer require renpengpeng/php-cache
包简介
Make caching easier
README 文档
README
Introduce
Php-cache encapsulates Redis, Memcache, Yac, and Apcu cache modes to make PHP cache more convenient.
Install
composer require renpengpeng/php-cache
Example
<?php require '../vendor/autoload.php'; use renpengpeng\Cache; Cache::connect([ 'type' => 'File', 'file' => [ 'cache_dir' => realpath(__DIR__).DIRECTORY_SEPARATOR.'cache' ] ],true); // Set the cache 60 seconds Cache::set('version','1.0.0',60); // Get the cache Cache::get('version','1.0.0'); // Since the increase Cache::increment('version'); // Since the reduction of Cache::reduction('version'); // Delay is permanent Cache::delay('version'); // Delete the cache Cache::delete('version'); // Clear the cache Cache::clear();
Manual
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2021-09-25