alonity/cache
Composer 安装命令:
composer require alonity/cache
包简介
Alonity cache
README 文档
README
Cache component
Install
composer require alonity/cache
Examples
use alonity\cache\Cache; require('vendor/autoload.php'); require_once('../vendor/autoload.php'); /** * Set storage * Default value: file * Supported storages: file, mongodb, redis, memcached, memcache */ Cache::$config['storage'] = 'mongodb'; // Set save path for file storage Cache::$config['path'] = __DIR__.'/tmp/cache'; $storage = Cache::getStorage(); // Check storage if defined if(is_null($storage)){ exit(Cache::$error); } if(!Cache::save('hello', [ ['id' => 1, 'name' => 'test'], ['id' => 2, 'name' => 'test2'] ])){ exit(Cache::$error); } var_dump(Cache::get('hello'));
Documentation: https://alonity.gitbook.io/alonity/components/cache
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-27