Giter VIP home page Giter VIP logo

simple-cache's Introduction

Apix-SimpleCache, the PSR-16 extension to Apix-Cache

Latest Stable Version Build Status Code Quality Code Coverage License Build Status

Apix-SimpleCache provides PSR-16 to Apix-Cache permitting easy caching and invalidation...

  • Fully unit-tested and compliant with PSR-1, PSR-2, PSR-4 and PSR-16.
  • Continuously integrated with PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3 and HHVM.

โ‡„ Pull requests and โ˜… Stars are always welcome. For bugs and feature request, please create an issue.


Basic usage

  use Apix\SimpleCache;

  $client = new \Redis();
  #$client = new \PDO('sqlite:...');    // Any supported client object e.g. Memcached, MongoClient, ...
  #$client = new Cache\Files($options); // or one that implements Apix\Cache\Adapter
  #$client = 'apc';                     // or an adapter name (string) e.g. "APC", "Runtime"
  #$client = new MyArrayObject();       // or even a plain array() or \ArrayObject.

  $cache = SimpleCache\Factory::getPool($client);           // without tagging support
  #$cache = SimpleCache\Factory::getTaggablePool($client);  // with tagging
    
  if ( !$cache->has('wibble_id') ) {
    $data = compute_slow_and_expensive_stuff();
    $cache->set('wibble_id', $data);
  }

  return $cache->get('wibble_id');

Installation

This project adheres to Semantic Versioning and can be installed using composer:

$ composer require apix/simple-cache:1.0.*

All notable changes to this project are documented in its CHANGELOG.

License

This work is licensed under the New BSD license -- see the LICENSE for the full details.
Copyright (c) 2010-2017 Franck Cassedanne

simple-cache's People

Contributors

frqnck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gentlemoore

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.