PHPackages                             epwt/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. epwt/cache-bundle

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

epwt/cache-bundle
=================

EPWT/Cache Symfony Bundle PSR-6 Cache Item Pool

1.0.0(11y ago)210MITPHPPHP &gt;=5.3

Since Apr 27Pushed 11y ago1 watchersCompare

[ Source](https://github.com/aurimasniekis/epwt-cache-bundle)[ Packagist](https://packagist.org/packages/epwt/cache-bundle)[ Docs](http://github.com/gcds/epwt-cache-bundle)[ RSS](/packages/epwt-cache-bundle/feed)WikiDiscussions master Synced 1mo ago

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

EPWTCacheBundle
===============

[](#epwtcachebundle)

[![Latest Stable Version](https://camo.githubusercontent.com/ef494ec9727a15ac5e5e54f6820a792da06e9c96f78471be521e359fb348f38d/68747470733a2f2f706f7365722e707567782e6f72672f657077742f63616368652d62756e646c652f762f737461626c65)](https://packagist.org/packages/epwt/cache-bundle) [![Total Downloads](https://camo.githubusercontent.com/ab8d970623a14e2281b3dca13e9765be946d69af81961012494ae8d3ecb0719d/68747470733a2f2f706f7365722e707567782e6f72672f657077742f63616368652d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/epwt/cache-bundle) [![Latest Unstable Version](https://camo.githubusercontent.com/e9772ad0cc492f3bad8b1e0935e14bd5fb7534bb9ed4424e977f0c8f2cf45b47/68747470733a2f2f706f7365722e707567782e6f72672f657077742f63616368652d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/epwt/cache-bundle) [![License](https://camo.githubusercontent.com/234483dba4c8f7afa502ba83b332a40d607bb2e563362b85c4b7568e1c5a7320/68747470733a2f2f706f7365722e707567782e6f72672f657077742f63616368652d62756e646c652f6c6963656e7365)](https://packagist.org/packages/epwt/cache-bundle)[![Analytics](https://camo.githubusercontent.com/76df2e2a531d8f9a9cc1316100c7a6cfa46cb582cb70f1e601c519e9e8ffb95f/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d36323334303333362d312f676364732f657077742d6361636865)](https://github.com/igrigorik/ga-beacon)

[![SensioLabsInsight](https://camo.githubusercontent.com/cda240a6ce8c8efd5231ffcabb13dab26bb2b63fa2caf3eb316496960b471bc9/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f37333663653738662d646465632d343734322d613437352d6339613837323565616564302f6269672e706e67)](https://insight.sensiolabs.com/projects/736ce78f-ddec-4742-a475-c9a8725eaed0)

The EPWTCacheBundle provides wrapper for [epwt/cache](https://github.com/gcds/epwt-cache) library smashed with [Symfony DependencyInjection](https://github.com/symfony/DependencyInjection) magic.

#### EPWT/Cache

[](#epwtcache)

EPWT/Cache is PSR-6 (Yes it only proposed) compiliant CacheItemPool implementation for Redis and maybe in future other Cache storage.

Require
-------

[](#require)

- Symfony &gt;2.3
- phpredis/predis ([SncRedisBundle](https://github.com/snc/SncRedisBundle) does really fine)

Instalation
-----------

[](#instalation)

```
composer require epwt/cache-bundle "~1.0"
```

```
public function registerBundles()
{
	$bundles[] = new EPWT\CacheBundle\EPWTCacheBundle();
}
```

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

[](#configuration)

All CacheItemPool configuration is done via Symfony Container

### Currently supported drivers:

[](#currently-supported-drivers)

- redis
- sncredis

Configuration Examples
----------------------

[](#configuration-examples)

#### Redis Driver

[](#redis-driver)

```

```

#### SncRedis Driver

[](#sncredis-driver)

```

```

#### Additional Options

[](#additional-options)

- If you want you can extend `CacheItemPool` class and specify it in `class` attribute.
- By default `CacheItemPool` name is `alias` attribute value but if you want use different one specify with `pool-name` attribute
- If you want to specify whole `CacheItemPool` default TTL use attribute `default-ttl` value is in seconds from setting value

Usage Examples
--------------

[](#usage-examples)

- This bundle has `CacheItemPoolsContainer` service with id `epwt_cache_pools`
- This budnle also provides `CacheItemPoolsAwareTrait` with requires `$this->getContainer` method, `$this->container` property or `$this->get()` method (In Controllers only) and provides `getCacheItemPool($name)` method for getting `CacheItemPool`

### With Trait

[](#with-trait)

```
class HelloWorldCommand extends ContainerAwareCommand
{
    use CacheItemPoolsAwareTrait;

    protected function configure()
    {
        $this->setName('acme:hello');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $pool = $this->getCacheItemPool('acme_demo_pool');

        $poolItem = new CacheItem('foo');
        $poolItem->set('bar');

        $pool->save($poolItem);
    }
}
```

### Without Trait

[](#without-trait)

```
class HelloWorldCommand extends ContainerAwareCommand
{
    protected function configure()
    {
        $this->setName('acme:hello');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $pool = $this->getContainer()->get('epwt_cache_pools')->get('acme_demo_pool');

        $poolItem = new CacheItem('foo');
        $poolItem->set('bar');

        $pool->save($poolItem);
    }
}
```

License
-------

[](#license)

This bundle is under the MIT license. See the complete license in the bundle:

```
Resources/meta/LICENSE

```

About
-----

[](#about)

EPWTCacheBundle is brought to you by [Aurimas Niekis](https://github.com/gcds).

Reporting an issue or a feature request
---------------------------------------

[](#reporting-an-issue-or-a-feature-request)

Issues and feature requests are tracked in the [Github issue tracker](https://github.com/gcds/epwt-cache-bundle/issues).

When reporting a bug, it may be a good idea to reproduce it in a basic project built using the [Symfony Standard Edition](https://github.com/symfony/symfony-standard)to allow developers of the bundle to reproduce the issue by simply cloning it and following some steps.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

4039d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/770bae1f46ac2b4536db820b8642491c25e2e2fd44e761110269e4722679a80d?d=identicon)[aurimasniekis](/maintainers/aurimasniekis)

---

Tags

symfonybundlerediscachepsr-6epwt

### Embed Badge

![Health badge](/badges/epwt-cache-bundle/health.svg)

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

###  Alternatives

[cache/redis-adapter

A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags

523.9M27](/packages/cache-redis-adapter)[tedivm/stash-bundle

Incorporates the Stash caching library into Symfony.

841.4M16](/packages/tedivm-stash-bundle)[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.1M5](/packages/symfony-bundles-redis-bundle)[symfony-bundles/event-queue-bundle

Symfony EventQueue Bundle

2512.7k](/packages/symfony-bundles-event-queue-bundle)

PHPackages © 2026

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