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 2w 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 40% 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

4256d 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

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M427](/packages/easycorp-easyadmin-bundle)[symfony/web-profiler-bundle

Provides a development tool that gives detailed information about the execution of any request

2.3k164.3M1.4k](/packages/symfony-web-profiler-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[ecotone/symfony-bundle

Ecotone for Symfony — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Symfony Messenger, via PHP attributes.

11258.2k1](/packages/ecotone-symfony-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1617.3k16](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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