PHPackages                             spacetab-io/harmony-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. spacetab-io/harmony-cache

ActiveLibrary[Caching](/categories/caching)

spacetab-io/harmony-cache
=========================

Asynchronous caching library

1.1.1(6y ago)0102MITPHPPHP &gt;=7.3

Since Dec 28Pushed 6y agoCompare

[ Source](https://github.com/spacetab-io/harmony-cache-php)[ Packagist](https://packagist.org/packages/spacetab-io/harmony-cache)[ RSS](/packages/spacetab-io-harmony-cache/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (10)Versions (14)Used By (2)

Cache
=====

[](#cache)

[![Latest Stable Version](https://camo.githubusercontent.com/f839cfd04060ae414a44b824062101c9881276c84a2b2549c8078eede96895cd/68747470733a2f2f706f7365722e707567782e6f72672f6861726d6f6e79696f2f63616368652f762f737461626c65)](https://packagist.org/packages/harmonyio/cache)[![Build Status](https://camo.githubusercontent.com/c4baf8091673eae41c998223e15e8676ed8a1b40bfe2d7bbf50f820c880a1c68/68747470733a2f2f7472617669732d63692e6f72672f4861726d6f6e79494f2f43616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/HarmonyIO/Cache)[![Build status](https://camo.githubusercontent.com/e5e5e731969ebd3bd501da537cf11b9c181424e1197f2153c1451b77d14671ba/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f336f6872726d3430676d6d656d6437692f6272616e63682f6d61737465723f7376673d74727565)](https://ci.appveyor.com/project/PeeHaa/cache/branch/master)[![Coverage Status](https://camo.githubusercontent.com/e3f258b0f08ffc61203d37d7da45e697a8b0329e385f0777e4bcf40703a16de6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4861726d6f6e79494f2f43616368652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/HarmonyIO/Cache?branch=master)[![License](https://camo.githubusercontent.com/c28f81a576d9d5485275153fac27dfd10c0a2e2d9dbb2a6968cdb2c4ef0261fc/68747470733a2f2f706f7365722e707567782e6f72672f6861726d6f6e79696f2f63616368652f6c6963656e7365)](https://packagist.org/packages/harmonyio/cache)

Async caching library

Requirements
------------

[](#requirements)

- PHP 7.3+
- Redis (if wanting to use the Redis caching provider)

In addition for non-blocking context one of the following event libraries should be installed:

- [ev](https://pecl.php.net/package/ev)
- [event](https://pecl.php.net/package/event)
- [php-uv](https://github.com/bwoebi/php-uv)

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

[](#installation)

```
composer require harmonyio/cache

```

Usage
-----

[](#usage)

This library both provides interfaces for working with the cache from external libraries as well as providing a way to interface with the cache directly.

This is mostly intended to be used by cache aware libraries and should in most cases not be worked with directly as this is a low-level library.

### Complete example usage

[](#complete-example-usage)

```
