PHPackages                             itinance/doctrine-cache-adapter-with-site-context - 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. itinance/doctrine-cache-adapter-with-site-context

ActiveLibrary[Caching](/categories/caching)

itinance/doctrine-cache-adapter-with-site-context
=================================================

v0.3(9y ago)114PHPPHP &gt;=5.4.4

Since Sep 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/itinance/doctrine-cache-adapter-with-site-context)[ Packagist](https://packagist.org/packages/itinance/doctrine-cache-adapter-with-site-context)[ RSS](/packages/itinance-doctrine-cache-adapter-with-site-context/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

DoctrineCacheAdapterWithSiteContext
===================================

[](#doctrinecacheadapterwithsitecontext)

If you are using Emanuele Minottos [TwigCacheBundle](https://github.com/EmanueleMinotto/TwigCacheBundle) and Simon Ochos white-label-bundle (), you will get trouble with the cache.

This class is a replacement for the Cache Adapter used in TwigCacheBundle, to respect the current site context in a white-label / multi-site environment.

Installation:
-------------

[](#installation)

Installation using composer:

```
    "repositories": [
        {
            "type": "git",
            "url": "git@github.com:itinance/DoctrineCacheAdapterWithSiteContext.git"
        }
    ],
    "require": {
        "itinance/DoctrineCacheAdapterWithSiteContext": "dev-master"
    },

```

Configuration
-------------

[](#configuration)

in app/config/services.yml add the following

```
    twig_cache.adapter:
        class: itinance\DoctrineCacheAdapterWithSiteContext
        arguments:
            - @cache_service
            - @site_context

```

@cache\_service could be configured like this:

```
    memcached:
        class: Memcached
        calls:
            - [ addServers, [ %memcached.servers% ] ]

    cache_service:
        class: Doctrine\Common\Cache\MemcachedCache
        calls:
            - [ setMemcached, [ @memcached ] ]

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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 ~568 days

Total

2

Last Release

3326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bdfaccd9eaf060eef8c7270c5dc5da7a255ee7f7393da0640847074bfcb96c5?d=identicon)[itinance](/maintainers/itinance)

---

Top Contributors

[![itinance](https://avatars.githubusercontent.com/u/1758597?v=4)](https://github.com/itinance "itinance (6 commits)")

### Embed Badge

![Health badge](/badges/itinance-doctrine-cache-adapter-with-site-context/health.svg)

```
[![Health](https://phpackages.com/badges/itinance-doctrine-cache-adapter-with-site-context/health.svg)](https://phpackages.com/packages/itinance-doctrine-cache-adapter-with-site-context)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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