fivelab/cache 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

fivelab/cache

最新稳定版本:v1.0

Composer 安装命令:

composer require fivelab/cache

包简介

Cache system

关键字:

README 文档

README

With this package you can cache any data in any storage.

Installation

Add FiveLab/Cache in your composer.json:

{
    "require": {
        "fivelab/cache": "~1.0"
    }
}

Now tell composer to download the library by running the command:

$ php composer.phar update fivelab/cache

Basic usage

Available storage:

  1. ArrayCache
    Cache data in internal array. Will be destroyed after ended script.
  2. RedisCache
    Cache data in Redis storage. Store data in HASH type.
  3. ChainCache
  4. NullCache

Examples:

use FiveLab\Component\Cache\ArrayCache;

$cache = new ArrayCache();

if (!$cache->has('my_key')) {
    $cache->set('my_key', 'My Value');
}

print $cache->get('my_key'); // Printing "My Value"

Symfony2

If you use Symfony2 Framework, you can use CacheClearer for clear cache.

Symfony2 ExpressionLanguage

If you use ExpressionLanguage (Symfony Component), you can use ParserCache for store ExpressionLanguage expression.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-31