定制 twodevs/cache-interface 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

twodevs/cache-interface

最新稳定版本:v1.0.0

Composer 安装命令:

composer require twodevs/cache-interface

包简介

Provides an cache interface for several adapters

README 文档

README

PHP interface library which provides an cache interface for several adapters.

Usage

1) Using the ArrayCache (Memory Cache)


// Using the array cache
$ws->setCache(new \TwoDevs\Cache\ArrayCache());

2) If doctrine cache is installed, it can be used to cache the result container using the doctrine cache adapter.


// Create a new DoctrineCache instance
$doctrineCache = new \Doctrine\Common\Cache\FilesystemCache('var/cache');

// Create a new DoctrineCache adapter
$cacheAdapter = new \TwoDevs\Cache\DoctrineCache($doctrineCache);

3) If zend cache is installed, it can be used to cache the result container using the zend cache adapter.


// Create a new ZendStorage instance
$zendCache = new \Zend\Cache\Storage\Adapter\Memory();

// Create a new ZendCache adapter
$cacheAdapter = new \TwoDevs\Cache\ZendCache($zendCache);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-25