Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apix/simple-cache
The PSR-16 extension to Apix-Cache
https://github.com/apix/simple-cache
apcs api apic-cache cache-busting igbinary memcached msgpack mysql oracle pdo per-simple-cache psr-16 psr-7 redis sql sqlite tagging
Last synced: about 5 hours ago
JSON representation
The PSR-16 extension to Apix-Cache
- Host: GitHub
- URL: https://github.com/apix/simple-cache
- Owner: apix
- License: other
- Created: 2017-05-03T12:36:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-31T19:46:29.000Z (about 5 years ago)
- Last Synced: 2024-10-11T15:49:47.268Z (28 days ago)
- Topics: apcs, api, apic-cache, cache-busting, igbinary, memcached, msgpack, mysql, oracle, pdo, per-simple-cache, psr-16, psr-7, redis, sql, sqlite, tagging
- Language: PHP
- Homepage:
- Size: 29.3 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Apix-SimpleCache, the PSR-16 extension to [Apix-Cache](//github.com/apix/cache)
=================================
[![Latest Stable Version](https://poser.pugx.org/apix/simple-cache/v/stable.svg)](https://packagist.org/packages/apix/simple-cache)
[![Build Status](https://scrutinizer-ci.com/g/apix/simple-cache/badges/build.png?b=master)](https://scrutinizer-ci.com/g/apix/simple-cache/build-status/master)
[![Code Quality](https://scrutinizer-ci.com/g/apix/simple-cache/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/apix/simple-cache/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/apix/simple-cache/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/apix/simple-cache/?branch=master)
[![License](https://poser.pugx.org/apix/simple-cache/license.svg)](https://packagist.org/packages/apix/simple-cache)
[![Build Status](https://travis-ci.org/apix/simple-cache.svg?branch=master)](https://travis-ci.org/apix/simple-cache)Apix-SimpleCache provides PSR-16 to **[Apix-Cache](//github.com/apix/cache)** permitting easy caching and invalidation...
* Fully **unit-tested** and compliant with PSR-1, PSR-2, PSR-4 and PSR-16.
* [Continuously integrated](https://travis-ci.org/apix/simple-cache) with **PHP** **5.3**, **5.4**, **5.5**, **5.6**, **7.0**, **7.1**, **7.2**, **7.3** ~~and HHVM~~.⇄ *[Pull requests](//github.com/apix/simple-cache/blob/master/.github/CONTRIBUTING.md)* and ★ *Stars* are always welcome. For bugs and feature request, please [create an issue](//github.com/apix/simple-cache/issues/new).
---
Basic usage
-----------```php
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](http://semver.org/) and can be installed using composer:
$ composer require apix/simple-cache:1.0.*
All notable changes to this project are documented in its [CHANGELOG](CHANGELOG.md).
License
-------
This work is licensed under the New BSD license -- see the [LICENSE](LICENSE.txt) for the full details.
Copyright (c) 2010-2017 Franck Cassedanne