Giter Site home page Giter Site logo

cache's Introduction

sabre/cache

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.