定制 fivepercent/cache 二次开发

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

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

fivepercent/cache

最新稳定版本:v1.0

Composer 安装命令:

composer require fivepercent/cache

包简介

Cache system

关键字:

README 文档

README

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

Installation

Add FivePercent/Cache in your composer.json:

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

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

$ php composer.phar update fivepercent/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 FivePercent\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.88k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 7
  • 推荐数: 2

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-04