starter-kit/cache 问题修复 & 功能扩展

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

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

starter-kit/cache

最新稳定版本:1.2.0

Composer 安装命令:

composer require starter-kit/cache

包简介

PHP singleton for Memcached/Redis

README 文档

README

PHP singleton for Memcached/Redis

Latest Stable Version License

Requirements

  • PHP >= 5.3

Suggestions

  • PHP Memcached extension
  • PHP Redis extension

Installation

Install directly via Composer:

$ composer require starter-kit/cache

Basic Usage

Memcached

<?php

// Require your autoloading script (Composer autoload here) to use namespaces
require_once 'vendor/autoload.php';

use StarterKit\Cache\Memcached;

// First instanciation : pass your Memcached parameters
$mc = Memcached::getInstance('YOUR_SERVER_NAME', 'YOUR_SERVER_PORT');

// Later in your code : you can retrieve your instance at any time, without creating new Memcached connection
$res = Memcached::getInstance()->set('yolo', 'swag');

Redis

<?php

// Require your autoloading script (Composer autoload here) to use namespaces
require_once 'vendor/autoload.php';

use StarterKit\Cache\Redis;

// First instanciation : pass your Redis parameters
$mc = Redis::getInstance('YOUR_SERVER_NAME', 'YOUR_SERVER_PORT');

// Later in your code : you can retrieve your instance at any time, without creating new Redis connection
$res = Redis::getInstance()->set('yolo', 'swag');

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-22