pinga/cache
最新稳定版本:v0.2
Composer 安装命令:
composer require pinga/cache
包简介
A simple cache library to manage application cache storing, loading and purging
关键字:
README 文档
README
Based on wonderful utopia-cache and scrawler-labs/swoole-cache
Getting Started
Install using composer:
composer require pinga/cache
File System Adapter
<?php require_once __DIR__ . '/../../vendor/autoload.php'; use Pinga\Cache\Cache; use Pinga\Cache\Adapter\Filesystem; $cache = new Cache(new Filesystem('/cache-dir')); $key = 'data-from-example.com'; $data = $cache->load($key, 60 * 60 * 24 * 30 * 3 /* 3 months */); if(!$data) { $data = file_get_contents('https://example.com'); $cache->save($key, $data); } echo $data;
Copyright and license
The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-09