PHPackages                             trt/doctrine-encrypted-cache-bundle - 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. trt/doctrine-encrypted-cache-bundle

ActiveLibrary[Caching](/categories/caching)

trt/doctrine-encrypted-cache-bundle
===================================

Doctrine Encrypted Cache Bundle

v0.2(11y ago)01.6kMITPHP

Since Dec 22Pushed 11y ago1 watchersCompare

[ Source](https://github.com/toretto460/doctrine-encoded-cache-bundle)[ Packagist](https://packagist.org/packages/trt/doctrine-encrypted-cache-bundle)[ RSS](/packages/trt-doctrine-encrypted-cache-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Doctrine Encoded Cache Bundle
=============================

[](#doctrine-encoded-cache-bundle)

This bundle integrates a Symfony2 application with the `trt/doctrine-encoded-cache` library.

\##Why cache encoding? Because sometimes there is the need to make the cached data unreadable. Think about high confidential data.
Only database servers are authorized to store datas.

How?
----

[](#how)

Cached data will be encrypted/decripted with AES256 (**php-mcrypt extension is required**)

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

[](#installation)

run `php composer.phar require trt/doctrine-encrypted-cache-bundle:~0.1`

Create your KeyProvider
-----------------------

[](#create-your-keyprovider)

Put the following lines with Symfony Kernel

```
    public function registerBundles()
    {
        $bundles = array(

            new Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
            new Trt\Doctrine\Cache\Bundle\DoctrineEncodedCacheBundle()
        );

    }
```

For security reason it's your responsability to store the encoding key in a safe place, so a key provider service is mandatory.

Create your own service implementing the `KeyProvider` interface.

Example:

```
class CacheKeyProvider implements \Trt\Doctrine\Cache\Key\KeyProvider
{

    /**
     * Provide the encoding key string.
     *
     * @return String
     */
    public function getKey()
    {
        return $this->fetchKeyFromASafePlace();
    }
}
```

Register the service:

```
services:
  my_bundle.cache.key_provider:
   class: My\Bundle\CacheKeyProvider
```

Full Configuration
------------------

[](#full-configuration)

According to the [DoctrineCacheBundle](https://github.com/doctrine/DoctrineCacheBundle) documentation, configure the cache service

```
## An Example with apc cache
doctrine_cache:
    aliases:
        cache_apc: my_apc_cache

    providers:
        my_apc_cache:
            type: apc
            namespace: my_apc_cache_ns
            aliases:
                - apc_cache

doctrine_encoded_cache:
  key_provider: my_bundle.cache.key_provider #Your key provider service
  cache: apc_cache #The doctrine cache service

# Enable the doctrine ORM cache
doctrine:
	orm:
	    result_cache_driver:
	        type: service
	        id: doctrine_encoded_cache
	    metadata_cache_driver:
	        type: service
	        id: doctrine_encoded_cache
	    query_cache_driver:
	        type: service
	        id: doctrine_encoded_cache
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

4157d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/97e5b23c6d1b7bd92d3ab1b3219515ab17cb504562b76e8694be6238470b87c1?d=identicon)[toretto460](/maintainers/toretto460)

---

Top Contributors

[![simodima](https://avatars.githubusercontent.com/u/1193857?v=4)](https://github.com/simodima "simodima (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/trt-doctrine-encrypted-cache-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/trt-doctrine-encrypted-cache-bundle/health.svg)](https://phpackages.com/packages/trt-doctrine-encrypted-cache-bundle)
```

###  Alternatives

[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.1M5](/packages/symfony-bundles-redis-bundle)[resquebundle/resque

A Symfony 4 bundle to manage Resque job queues

51137.1k1](/packages/resquebundle-resque)[rikudou/psr6-dynamo-db-bundle

PSR-6 and PSR-16 cache implementation using AWS DynamoDB for Symfony

2077.8k](/packages/rikudou-psr6-dynamo-db-bundle)[mmoreram/rsqueue-bundle

Redis Symfony2 Queue Bundle, a simple and soft redis based message queue for symfony2

5360.7k1](/packages/mmoreram-rsqueue-bundle)[ack/notification-bundle

Symfony real time notification system

259.3k](/packages/ack-notification-bundle)

PHPackages © 2026

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