PHPackages                             thefuriouscoder/doctrine-cache-factory - 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. thefuriouscoder/doctrine-cache-factory

ActiveLibrary[Caching](/categories/caching)

thefuriouscoder/doctrine-cache-factory
======================================

A simple static wrapper for Docrine Cache drivers.

117.6k↓93.2%1[1 issues](https://github.com/thefuriouscoder/doctrine-cache-factory/issues)PHP

Since Nov 5Pushed 10y ago1 watchersCompare

[ Source](https://github.com/thefuriouscoder/doctrine-cache-factory)[ Packagist](https://packagist.org/packages/thefuriouscoder/doctrine-cache-factory)[ RSS](/packages/thefuriouscoder-doctrine-cache-factory/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Doctrine Cache factory
======================

[](#doctrine-cache-factory)

[![Total Downloads](https://camo.githubusercontent.com/bda227a1f257d57fcf1be68dd8b08fe2c67a5a95541b3731da774f3f2f1dd7a5/68747470733a2f2f706f7365722e707567782e6f72672f746865667572696f7573636f6465722f646f637472696e652d63616368652d666163746f72792f646f776e6c6f6164732e706e67)](https://packagist.org/packages/thefuriouscoder/doctrine-cache-factory)

A simple static wrapper for Doctrine Cache drivers.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.3
- [Doctrine Cache](https://github.com/doctrine/cache) &gt;= 1.5.1

Install
-------

[](#install)

### Composer

[](#composer)

Add a dependency on `thefuriouscoder/doctrine-cache-factory` to your project's `composer.json` file.

```
{
    "require": {
        "thefuriouscoder/doctrine-cache-factory": "dev-master"
    }
}
```

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

[](#configuration)

### Initialize the Cache Store.

[](#initialize-the-cache-store)

Add the following configuration code to your project bootstraping file depending on the storage you are goinng to use.

### Using Memcached (php5-memcached extension needed)

[](#using-memcached-php5-memcached-extension-needed)

```
// configure memcached setting.
TFC\Cache\DoctrineCacheFactory::setOption(
    [
        'storage'     => 'memcached',
        'prefix'      => 'rlyeh',
        'default_ttl' => 3600,
        'servers'     => [
            ['server1', 11211, 20],
            ['server2', 11211, 80]
        ]
    ]
);
```

### Using APC

[](#using-apc)

```
// configure APC setting.
TFC\Cache\DoctrineCacheFactory::setOption(
    [
        'storage'     => 'apc',
        'default_ttl' => 3600
    ]
);
```

### Using Redis

[](#using-redis)

```
// configure Redis setting.
TFC\Cache\DoctrineCacheFactory::setOption(
    [
        'storage'     => 'redis',
        'prefix'      => 'rlyeh',
        'host         => '127.0.0.1',
        'port'        => 6379,
        'default_ttl' => 3600
    ]
);
```

### Basic usage

[](#basic-usage)

```
$cache = \TFC\Cache\DoctrineCacheFactory::factory("redis");
$cache->setNamespace("miskatonic");
$cache->save($key,$data);
$cache->contains($key);
$data = $cache->fetch($key);
$cache->delete($key);
$cache->deleteAll();
```

For more detailed instructions on Doctrine cache usage, please refer to doctrine [documentation](http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/caching.html)

License
-------

[](#license)

MIT License

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ed65a4ed61955b93b80232fc79b71da578bf69e06c172bf6d28a663981c7054?d=identicon)[thefuriouscoder](/maintainers/thefuriouscoder)

---

Top Contributors

[![thefuriouscoder](https://avatars.githubusercontent.com/u/944027?v=4)](https://github.com/thefuriouscoder "thefuriouscoder (5 commits)")

### Embed Badge

![Health badge](/badges/thefuriouscoder-doctrine-cache-factory/health.svg)

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

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

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