PHPackages                             tbessenreither/multi-level-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. tbessenreither/multi-level-cache

ActiveSymfony-bundle[Caching](/categories/caching)

tbessenreither/multi-level-cache
================================

A Symfony bundle providing a high performance multi-level caching system.

v1.4.2(1mo ago)016↓50%MITPHPPHP ^8.4CI passing

Since Jan 3Pushed 1mo agoCompare

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

READMEChangelog (10)Dependencies (28)Versions (27)Used By (0)

MultiLevelCache Symfony Bundle
==============================

[](#multilevelcache-symfony-bundle)

A high-performance, multi-level caching system for Symfony applications. This bundle provides a flexible, extensible, and developer-friendly way to combine multiple cache backends (memory, Redis, file, etc.) for optimal speed and reliability.

It has two parts to it.

1. The Multi Level Cache (MLC)
2. The Cached Service Generator (CSG)

Of the two parts, the CSG is the intended way of using the MLC. But the MLC itself also has it's use cases and can be used directly without the CSG. Both are documented in sections bellow.

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

[](#installation)

Install via Composer from GitHub:

1. Require the package: ```
    composer require tbessenreither/multi-level-cache
    ```

Tip

The following steps can be automated by using [Copycat](https://github.com/tbessenreither/copycat)

2. Enable the Bundle in `config/bundles.php`: ```
    Tbessenreither\MultiLevelCache\MultiLevelCacheBundle::class => ['all' => true],
    ```
3. Configure Environment Variables as needed:
    - `REDIS_DSN` (if using Redis, so basically always)
    - `MLC_DISABLE_READ` (optional, disables cache reads if it exists at all, no matter the value)
    - `MLC_COLLECT_ENHANCED_DATA` (optional, enables enhanced data collection but has performance impact)

Basic concept
-------------

[](#basic-concept)

Its a fast multi level cache consisting, in it's standard configuration, of:

- a fast In Memory Ring Cache
- and a second Level Redis Cache

Most notable features
---------------------

[](#most-notable-features)

- Faster and much more memory efficient than the symfony cache (We love it, but we needed something faster)
- Deduplication of cached objects on read
- Cache statistics and profiling (Symfony Profiler integration)
- Beta decay and TTL randomization to prevent stampedes

Cached Service Generator (CSG)
==============================

[](#cached-service-generator-csg)

As mentioned above, the main way of using the MLC is via the Cached Service Generator.

[Cached Service Generator Documentation](documentation/mlc-cachedservicegenerator.md)

MultiLevelCacheService and MultiLevelCacheFactory
=================================================

[](#multilevelcacheservice-and-multilevelcachefactory)

For details on how to use the MLC Service and Factory directly.

[MultiLevelCacheService and MultiLevelCacheFactory Documentation](documentation/mlc-service-and-factory.md)

License
-------

[](#license)

MIT

Contributors
============

[](#contributors)

Awesome people who contributed to this package

- [dsentker](https://github.com/dsentker)
- [schwabwaldemar](https://github.com/schwabwaldemar)
- [haraldpdl](https://github.com/haraldpdl)

Honorable mentions
------------------

[](#honorable-mentions)

thanks for support goes to:

- [Robinson-Software-Development](https://github.com/robinson-software-development)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance90

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~3 days

Total

24

Last Release

47d ago

### Community

Maintainers

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

---

Top Contributors

[![tbessenreither](https://avatars.githubusercontent.com/u/12699622?v=4)](https://github.com/tbessenreither "tbessenreither (85 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/tbessenreither-multi-level-cache/health.svg)

```
[![Health](https://phpackages.com/badges/tbessenreither-multi-level-cache/health.svg)](https://phpackages.com/packages/tbessenreither-multi-level-cache)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M192](/packages/simplesamlphp-simplesamlphp)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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