PHPackages                             kemist/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. kemist/cache

ActiveLibrary[Caching](/categories/caching)

kemist/cache
============

A simple caching library

v1.1.3(8y ago)236MITPHPPHP &gt;=5.3.0

Since Sep 25Pushed 8y ago2 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (15)Used By (0)

Cache
=====

[](#cache)

[![Build Status](https://camo.githubusercontent.com/f4547a6b4ee82d71c0424404c655dd88a7c4116dce8ff5cf9bc817a8dd030240/68747470733a2f2f7472617669732d63692e6f72672f6b656d69737438302f43616368652e737667)](https://travis-ci.org/kemist80/Cache)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/62b43800e2aa7a42203a9a75ce4a87fbb1f3e7d7df4e51cfc0d00ed7582d029f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b656d69737438302f43616368652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/kemist80/Cache/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/412e98e8eef8709849f916464194423a73e0e111ca99d8bc318e503a8fe5f3c7/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6b656d69737438302f43616368652e737667)](https://coveralls.io/r/kemist80/Cache?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/36e4ebb0faf11c73688f1cc2e166eff3049d8b48b274f59a08b30be29e920aed/68747470733a2f2f706f7365722e707567782e6f72672f6b656d6973742f63616368652f762f737461626c652e737667)](https://packagist.org/packages/kemist/cache)[![License](https://camo.githubusercontent.com/421566b6f48f6abe1cc004f493ef99bbe1adc689ae76697fb6ee188545073e3b/68747470733a2f2f706f7365722e707567782e6f72672f6b656d6973742f63616368652f6c6963656e73652e737667)](https://packagist.org/packages/kemist/cache)

Caching library with the following features:

- Extensible storage interface
- Automatic expiration handling even if cache storage doesn't support it
- Remembers when each cached item was read/written/accessed last time or written for the first time (created).
- Counts how many times a cached item was read/written since creation
- Counts cache hits (number of successful retrieving)
- Counts cache misses (number of attempts to retrieve not existing or expired cache item)
- Supports compressed storing
- Tagged caching

Installation
------------

[](#installation)

Via composer:

```
{
    "require": {
        "kemist/cache": "~1.1"
    }
}
```

Usage
-----

[](#usage)

Initialization:

```
