承接 anekdotes/cache 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

anekdotes/cache

Composer 安装命令:

composer require anekdotes/cache

包简介

Allows caching using different drivers

README 文档

README

Latest Stable Version Build Status codecov.io StyleCI License Total Downloads Codacy Badge

Allows caching using different drivers

Installation

Install via composer into your project:

composer require anekdotes/cache

Usage

Declare your Cache object depending on your Driver. After construction, all Cache objects can be manipulated the same way.

use Anekdotes\Cache\FileCache;
$path = 'tmp/cache/'; //The slash at the end is IMPORTANT. MAKE SURE YOU HAVE IT!
$cache = new FileCache($path);
$key = 'Toaster';
$value = 'Test';
$minutes = 5;
$cache->set($key, $value, $minutes);
$cache->get('Toaster'); //Returns 'Test' as long as this call is made in a 5 minute time-frame past the previous set call.
$cache->time('Toaster'); //Return the datetime object of when this key has been set
$cache->forget('Toaster');
$cache->has('Toaster'); //Returns false.

Notes

  • The ArrayCache driver does not currently analyze expiration time. This means all array cached objects last forever.

  • The FileCache driver does not implement the increment and decrement functions. Both functions throw LogicException under this driver.

  • Setting a cache's expiration to zero will make it never expire. Using ```$cache->forever()````does the same thing.

  • You can use $cache->flush() to remove all data in the cache.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固