PHPackages                             kitpages/simple-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. [Database &amp; ORM](/categories/database)
4. /
5. kitpages/simple-cache-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

kitpages/simple-cache-bundle
============================

Very simple cache system for symfony2. The cache data are saved in one table in database.

v3.0.0(12y ago)527.7k31BSDPHP

Since May 24Pushed 12y ago7 watchersCompare

[ Source](https://github.com/kitpages/KitpagesSimpleCacheBundle)[ Packagist](https://packagist.org/packages/kitpages/simple-cache-bundle)[ Docs](http://github.com/kitpages/KitpagesSimpleCacheBundle)[ RSS](/packages/kitpages-simple-cache-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (7)Used By (1)

KitpagesSimpleCacheBundle
=========================

[](#kitpagessimplecachebundle)

Very simple cache system for symfony2. The cache data are saved in one table in database.

author : Philippe Le Van (twitter : @plv)

Installation
============

[](#installation)

hum... as usual...

put the code in vendors/Kitpages/SimpleCacheBundle

add vendors/ in the app/autoload.php

add the new Bundle in app/appKernel.php

You need to create a table in the database :

```
CREATE TABLE `simple_cache_backend` (
  `id` varchar(255) NOT NULL,
  `data` longtext COMMENT '(DC2Type:array)',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `expired_at` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

```

(or you can use php app/console doctrine:schema:update)

Users Guide
===========

[](#users-guide)

1/ record &amp; retrieve into/from the cache
--------------------------------------------

[](#1-record--retrieve-intofrom-the-cache)

```
$cacheManager = $this->get('kitpages.simple_cache');
$html = $cacheManager->get(
    'my-cache-uniq-id-12',
    function() {
        $output = "hello world";
        sleep (3);
        return $output;
    }
);

```

2/ clear the cache
------------------

[](#2-clear-the-cache)

```
$cacheManager = $this->get('kitpages.simple_cache');
$cacheManager->clear('my-cache-uniq-id-12');

```

3/ a more complex example : arguments given to the callback and expiration
--------------------------------------------------------------------------

[](#3-a-more-complex-example--arguments-given-to-the-callback-and-expiration)

```
$html = $cacheManager->get(
    'my-cache-uniq-id-12',
    function($arg1, $arg2) {
        $output = "hello world";
        sleep (3);
        return $output;
    },
    array(12, 34),
    $myExpirationTimeInSeconds
);

```

4/ multiple delete in the cache
-------------------------------

[](#4-multiple-delete-in-the-cache)

```
$cacheManager = $this->get('kitpages.simple_cache');
$cacheManager->clear('my-cache-%');
// remove all the entries in the cache beginning by "my-cache-"

```

###  Health Score

36

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 72.7% 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 ~79 days

Total

7

Last Release

4577d ago

Major Versions

v1.0.0 → 2.0.x-dev2012-10-08

v2.1.0RC1 → v3.0.02013-09-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/95c1423b83010cc8afd1fc966d26cc6fc5d7fb5d000e5d7582adcd8392bd239c?d=identicon)[kitpages](/maintainers/kitpages)

---

Top Contributors

[![philippe-levan](https://avatars.githubusercontent.com/u/393066?v=4)](https://github.com/philippe-levan "philippe-levan (8 commits)")[![benjamindulau](https://avatars.githubusercontent.com/u/430689?v=4)](https://github.com/benjamindulau "benjamindulau (3 commits)")

---

Tags

doctrinecache

### Embed Badge

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

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

###  Alternatives

[knplabs/doctrine-behaviors

Doctrine Behavior Traits

93612.6M58](/packages/knplabs-doctrine-behaviors)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

44917.5M146](/packages/sonata-project-doctrine-orm-admin-bundle)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4756.8M12](/packages/fresh-doctrine-enum-bundle)[data-dog/audit-bundle

Audit bundle for symfony2 and doctrine orm, logs any database change

141881.8k1](/packages/data-dog-audit-bundle)[debesha/doctrine-hydration-profiler-bundle

Information about hydration of doctrine entities at the profiler

130587.4k1](/packages/debesha-doctrine-hydration-profiler-bundle)[cache/cache-bundle

Symfony 2 bundle providing integration between PSR-6 compliant cache services and the framework. It supports cache for sessions, routing and Doctrine

43435.9k](/packages/cache-cache-bundle)

PHPackages © 2026

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