PHPackages                             genkgo/cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. genkgo/cache

ActiveLibrary[Caching](/categories/caching)

genkgo/cache
============

0.4.3(3y ago)123.0k↓50%1PHPPHP &gt;=5.6

Since Jan 22Pushed 3y ago3 watchersCompare

[ Source](https://github.com/genkgo/cache)[ Packagist](https://packagist.org/packages/genkgo/cache)[ RSS](/packages/genkgo-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (20)Used By (0)

Genkgo.Cache
============

[](#genkgocache)

PHP Cache library using mechanisms as originally proposed by Anthony Ferrara.

### Credit to Anthony Ferrara.

[](#credit-to-anthony-ferrara)

All the credit for the cache mechanisms go to [@ircmaxell](http://blog.ircmaxell.com). Please go and read his [blog post explaining why cache should be implemented this way](http://blog.ircmaxell.com/2014/10/a-followup-to-open-letter-to-php-fig.html).

### Installation

[](#installation)

Requires PHP 5.5 or later. There are no plans to support PHP 5.4 or PHP 5.3. In case this is an obstacle for you, conversion should be no problem. The library is very small.

It is installable and autoloadable via Composer as [genkgo/cache](https://packagist.org/packages/genkgo/cache).

### Quality

[](#quality)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5e74c6193a243b97ef93f66718c285ac22c43bea9e915084b7e6255c59d48eed/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67656e6b676f2f63616368652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/genkgo/cache/)[![Code Coverage](https://camo.githubusercontent.com/29d7572a3ab55d02e8f7e400cd75c445a3d3c4bb281cdd897899353f56695c73/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67656e6b676f2f63616368652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/genkgo/cache/)[![Build Status](https://camo.githubusercontent.com/ec827c7497429124fb0eb6298671a9596fe7ede33f7d23760dd5ed3417ccc703/68747470733a2f2f7472617669732d63692e6f72672f67656e6b676f2f63616368652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/genkgo/cache)

To run the unit tests at the command line, issue `phpunit -c tests/`. [PHPUnit](http://phpunit.de/manual/) is required.

This library attempts to comply with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

Getting Started
---------------

[](#getting-started)

### Create your own adapter

[](#create-your-own-adapter)

Create an adapter that implements the CacheAdapterInterface. A simple array adapter would look as follows. The array adapter is also shipped with this library.

```
