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

ActiveLibrary[Caching](/categories/caching)

bluetree-service/cache
======================

Compatible with PSR-6 and PSR-16 cache library

0.5.0.1(4mo ago)042Apache-2.0PHPPHP ^8.2CI passing

Since Nov 25Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/bluetree-service/cache)[ Packagist](https://packagist.org/packages/bluetree-service/cache)[ Docs](https://github.com/bluetree-service/cache)[ RSS](/packages/bluetree-service-cache/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (6)Versions (11)Used By (0)

Bluetree PSR-6 &amp; PSR-16 cache
=================================

[](#bluetree-psr-6--psr-16-cache)

[![Latest Stable Version](https://camo.githubusercontent.com/b88033e4ba8c8d42c7a3963f57d1bed7b50b432b7f5bade2fddc8e3fea63d354/68747470733a2f2f706f7365722e707567782e6f72672f626c7565747265652d736572766963652f63616368652f762f737461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bluetree-service/cache)[![Total Downloads](https://camo.githubusercontent.com/f5f57cab405722ef700d74b78431174be64a0af85d94110e50fac9a3d09ea629/68747470733a2f2f706f7365722e707567782e6f72672f626c7565747265652d736572766963652f63616368652f646f776e6c6f6164732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bluetree-service/cache)[![License](https://camo.githubusercontent.com/dfa81356aaac1f0b7a557d7ba0e45c1b78b10daeebb5e7a59eb272cf8d0f567a/68747470733a2f2f706f7365722e707567782e6f72672f626c7565747265652d736572766963652f63616368652f6c6963656e73652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bluetree-service/cache)

[![Build Status](https://camo.githubusercontent.com/673e1ebb34bac897f6ba66af56f63460de1af1e6de9e658b33fe11ddbff56abd/68747470733a2f2f7472617669732d63692e6f72672f626c7565747265652d736572766963652f63616368652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bluetree-service/cache)[![Coverage Status](https://camo.githubusercontent.com/5b5a781a98469d3a9360fa22595061035fbdfdd589860030e63ad184f70b2dc6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f626c7565747265652d736572766963652f63616368652f62616467652e7376673f7374796c653d666c61742d737175617265266272616e63683d6d6173746572)](https://coveralls.io/github/bluetree-service/cache?branch=master)[![Build Status](https://camo.githubusercontent.com/27612b3f7bc0cdb721a5a15731ab0af5643922126dac7092aec7f5d378e83395/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f626c7565747265652d736572766963652f63616368652f6261646765732f6275696c642e706e673f7374796c653d666c61742d73717561726526623d6d6173746572)](https://scrutinizer-ci.com/g/bluetree-service/cache/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/77a05afb00e6ed4ea2c250faae86e8b889638a855dc4eb3b15438a3ceadc6dc7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f626c7565747265652d736572766963652f63616368652f6261646765732f636f7665726167652e706e673f7374796c653d666c61742d73717561726526623d6d6173746572)](https://scrutinizer-ci.com/g/bluetree-service/cache/?branch=master)

[![Bugs](https://camo.githubusercontent.com/045a689fc4ebd9f2f329c4f4eaca8ae6e7d8acd3f8e6a71da38b718c53483691/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d626c7565747265652d736572766963655f6361636865266d65747269633d62756773)](https://sonarcloud.io/summary/new_code?id=bluetree-service_cache)[![Code Smells](https://camo.githubusercontent.com/7e3b30e49f554a2271345e5f07a952795a9a904a63e6f680cbe8bd47b9f2ff21/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d626c7565747265652d736572766963655f6361636865266d65747269633d636f64655f736d656c6c73)](https://sonarcloud.io/summary/new_code?id=bluetree-service_cache)[![Coverage](https://camo.githubusercontent.com/2ef0ea6d5805d5e536df4b00768789e1f85751190b88f02f9ec69ef5d4de517f/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d626c7565747265652d736572766963655f6361636865266d65747269633d636f766572616765)](https://sonarcloud.io/summary/new_code?id=bluetree-service_cache)[![Reliability Rating](https://camo.githubusercontent.com/82fd11a5c4dc4842a71a6d1c41e86fe23a6412cc625c8c62f3f79945a63a5a9c/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d626c7565747265652d736572766963655f6361636865266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/summary/new_code?id=bluetree-service_cache)[![Security Rating](https://camo.githubusercontent.com/d1114cfe49a6b604caa5e2c1043215f68c52dada0cb0b539a9313d9868d7bc93/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d626c7565747265652d736572766963655f6361636865266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/summary/new_code?id=bluetree-service_cache)[![Maintainability Rating](https://camo.githubusercontent.com/65229bc2adbeca52b2cbf5f61fbce0209813fcd337ceffa4ce402ea5102637af/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d626c7565747265652d736572766963655f6361636865266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/summary/new_code?id=bluetree-service_cache)[![Vulnerabilities](https://camo.githubusercontent.com/c73372a3a5ae8a82ed23b684b365b41150d858f54a3dd2074c5784d55ae61b6e/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d626c7565747265652d736572766963655f6361636865266d65747269633d76756c6e65726162696c6974696573)](https://sonarcloud.io/summary/new_code?id=bluetree-service_cache)

[![SonarQube Cloud](https://camo.githubusercontent.com/5359d686f5abad04d5f03fef6095cbef4b29269cf24334b644c076fa915e3ac9/68747470733a2f2f736f6e6172636c6f75642e696f2f696d616765732f70726f6a6563745f6261646765732f736f6e6172636c6f75642d6461726b2e737667)](https://sonarcloud.io/summary/new_code?id=bluetree-service_cache)

PSR-6 and/or PSR-16 cache system, based on file storage.

### Included libraries

[](#included-libraries)

- **BlueCache\\Cache** - Basic class for PSR-6 cache handling
- **BlueCache\\SimpleCache** - Basic class for PSR-16 cache handling
- **BlueCache\\CacheItem** - Cache item element for PSR-6 (used also not explicitly by SimpleCache)
- **BlueCache\\CacheException** - Exception class for all PSR-6/16 exceptions
- **BlueCache\\Common** - Common with PSR-6 and 16 methods
- **BlueCache\\Storage\\Common** - Common methods for all storage classes
- **BlueCache\\Storage\\File** - Allow storage cache as files on local filesystem
- **BlueCache\\Storage\\Memcached** -Allow storage cache in Memcached server
- **BlueCache\\Storage\\StorageInterface** - Storage interface for future usage by other storage systems

Documentation
-------------

[](#documentation)

- [PSR-6 cache](https://github.com/bluetree-service/cache/blob/develop/doc/psr-6-cache.md "PSR-6 cache")
- [PSR-16 cache](https://github.com/bluetree-service/cache/blob/develop/doc/psr-16-cache.md "PSR-16 cache")
- [File storage](https://github.com/bluetree-service/cache/blob/develop/doc/FileStorage.md "File storage")

Install via Composer
--------------------

[](#install-via-composer)

To use packages you can just download package and pace it in your code. But recommended way to use *BlueCache* is install it via Composer. To include *BlueCache*libraries paste into composer json:

```
{
    "require": {
        "bluetree-service/cache": "version_number"
    }
}
```

Project description
-------------------

[](#project-description)

### Used conventions

[](#used-conventions)

- **Namespaces** - each library use namespaces
- **PSR-2** - [PSR-2](http://www.php-fig.org/psr/psr-2/) coding standard
- **PSR-4** - [PSR-4](http://www.php-fig.org/psr/psr-4/) auto loading standard
- **PSR-6** - [PSR-6](http://www.php-fig.org/psr/psr-6/) cache standard
- **PSR-16** - [PSR-16](http://www.php-fig.org/psr/psr-16/) cache standard
- **Composer** - [Composer](https://getcomposer.org/)

### Requirements

[](#requirements)

- PHP 8.2 or higher

Change log
----------

[](#change-log)

All release version changes:
[Change log](https://github.com/bluetree-service/cache/blob/develop/doc/changelog.md "Change log")

License
-------

[](#license)

This bundle is released under the Apache license.
[Apache license](https://github.com/bluetree-service/cache/LICENSE "Apache license")

Travis Information
------------------

[](#travis-information)

[Travis CI Build Info](https://travis-ci.org/bluetree-service/cache)

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance74

Regular maintenance activity

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 91% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~427 days

Recently: every ~744 days

Total

8

Last Release

141d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.6.0

0.4.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe3bb01759d649013c9375dfbc9e45145e315cc5dbd7448debfc95dba907bf11?d=identicon)[chajr](/maintainers/chajr)

---

Top Contributors

[![chajr](https://avatars.githubusercontent.com/u/1511381?v=4)](https://github.com/chajr "chajr (122 commits)")[![michaladamiaklingaro](https://avatars.githubusercontent.com/u/133742035?v=4)](https://github.com/michaladamiaklingaro "michaladamiaklingaro (12 commits)")

---

Tags

cachepsr-16psr-6

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bluetree-service-cache/health.svg)

```
[![Health](https://phpackages.com/badges/bluetree-service-cache/health.svg)](https://phpackages.com/packages/bluetree-service-cache)
```

###  Alternatives

[laminas/laminas-cache

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output

1067.2M145](/packages/laminas-laminas-cache)[cache/simple-cache-bridge

A PSR-6 bridge to PSR-16. This will make any PSR-6 cache compatible with SimpleCache.

423.3M28](/packages/cache-simple-cache-bridge)[codeigniter4/cache

PSR-6 and PSR-16 Cache Adapters for CodeIgniter 4

1321.4k](/packages/codeigniter4-cache)[infocyph/intermix

A lightweight PHP DI container, invoker, serializer, and utility toolkit.

137.3k1](/packages/infocyph-intermix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
