PHPackages                             michaelesmith/object-cache - 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. michaelesmith/object-cache

ActiveLibrary[Caching](/categories/caching)

michaelesmith/object-cache
==========================

An object cache that will seamlessly cache all method calls to an object

155PHP

Since Sep 6Pushed 12y ago1 watchersCompare

[ Source](https://github.com/michaelesmith/ObjectCache)[ Packagist](https://packagist.org/packages/michaelesmith/object-cache)[ RSS](/packages/michaelesmith-object-cache/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/c744afbc5615d54365b67e17c51635878b4023d0bf0a5da7cdf0fc8198c9308e/68747470733a2f2f7472617669732d63692e6f72672f6d69636861656c65736d6974682f4f626a65637443616368652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/michaelesmith/ObjectCache)

README
======

[](#readme)

What is it?
-----------

[](#what-is-it)

An object cache that will seamlessly cache all method calls to an object. Basically it will mimic an object caching method calls made to it. This is probably most useful in dependency injection. One caveat, a method called with the same parameters is expected to always return the same value.

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

[](#installation)

### Use Composer (*recommended*)

[](#use-composer-recommended)

The recommended way to install msDateTime is through composer.

If you don't have Composer yet, download it following the instructions on  or just run the following command:

```
curl -s http://getcomposer.org/installer | php

```

Just create a `composer.json` file for your project:

```
{
    "require": {
        "michaelesmith/object-cache": "*"
    }
}
```

For more info on composer see

Examples
--------

[](#examples)

\###Basic

```
$object = ...;
$cache = new \Doctrine\Common\Cache\ArrayCache();
$oc = new ObjectCache($object, $cache);
// use $oc as usual and methods will only be called once

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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://avatars.githubusercontent.com/u/181546?v=4)[Michael Smith](/maintainers/michaelesmith)[@michaelesmith](https://github.com/michaelesmith)

---

Top Contributors

[![michaelesmith](https://avatars.githubusercontent.com/u/181546?v=4)](https://github.com/michaelesmith "michaelesmith (3 commits)")

### Embed Badge

![Health badge](/badges/michaelesmith-object-cache/health.svg)

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

###  Alternatives

[beryllium/cachebundle

Provides an interface to Memcache for Symfony2 applications

32136.0k](/packages/beryllium-cachebundle)

PHPackages © 2026

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