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
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-25