承接 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
  • 点击次数: 1
  • 依赖项目数: 7
  • 推荐数: 2

GitHub 信息

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

其他信息

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