定制 sabre/cache 二次开发

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

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

sabre/cache

最新稳定版本:2.0.2

Composer 安装命令:

composer require sabre/cache

包简介

Simple cache abstraction layer implementing PSR-16

README 文档

README

This repository is a simple abstraction layer for key-value caches. It implements PSR-16.

If you need a super-simple way to support PSR-16, sabre/cache helps you get started. It's as hands-off as possible.

It also comes with a test-suite that can be used by other PSR-16 implementations.

Installation

Make sure you have composer installed, and then run:

composer require sabre/cache

Usage

Read PSR-16 for the API. We follow it to the letter.

In-memory cache

This is useful as a test-double for long-running processes. The Memory cache only lasts as long as the object does.

$cache = new \Sabre\Cache\Memory();

APCu cache

This object uses the APCu api for caching. It's a fast memory cache that's shared by multiple PHP processes.

$cache = new \Sabre\Cache\Apcu();

Memcached cache

This object uses the Memcached extension for caching.

$memcached = new \Memcached();
$memcached->addServer('127.0.0.1', 11211);
$cache = new \Sabre\Cache\Memcached($memcached);

You are responsible for configuring memcached, and you just pass a fully instantiated objected to the \Sabre\Cache\Memcached constructor.

Build status

branch status
master Build Status

Questions?

Head over to the sabre/dav mailinglist, or you can also just open a ticket on GitHub.

Made at fruux

This library is being developed by fruux. Drop us a line for commercial services or enterprise support.

统计信息

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

GitHub 信息

  • Stars: 53
  • Watchers: 10
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-01-03