承接 graphstory/cache-interface 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

graphstory/cache-interface

Composer 安装命令:

composer require graphstory/cache-interface

包简介

Generic cache interfaces

README 文档

README

Simple cache adapters and interface based on Anthony Ferrara's blog post A Followup To An Open Letter To PHP-FIG.

Build Status

Installation

Using Composer

Use Composer to install the cache-interface library:

$ composer require graphstory/cache-interface

Usage

// Example using Daniel González's Cache library

use Desarrolla2\Cache\Cache;
use Desarrolla2\Cache\Adapter\File;
use GraphStory\Console\Cache\DesarrollaAdapter;

$cacheDir = '/tmp';
$adapter = new File($cacheDir);
$adapter->setOption('ttl', 3600);
$desarrolla2 = new Cache($adapter);
$cache = DesarrollaAdapter($desarrolla2);

$cache->set('key', 'myKeyValue', 3600);

// later ...

echo $cache->get('key');

(The above example was mostly cribbed from the desarrolla2/Cache documentation.)

BYOA (bring your own adapter)

You can write your own adapter by creating a class that implements the CacheAdapter interface. Use the other adapters as a reference and you should be good to go!

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固