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

ActiveLibrary[Caching](/categories/caching)

andydune/object-cache-proxy
===========================

Allow cache results for execution object method. Transparent to working code.

v1.1.1(7y ago)116[1 PRs](https://github.com/AndyDune/ObjectCacheProxy/pulls)MITPHPPHP &gt;=5.6

Since May 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/AndyDune/ObjectCacheProxy)[ Packagist](https://packagist.org/packages/andydune/object-cache-proxy)[ Docs](https://github.com/AndyDune/ObjectCacheProxy)[ RSS](/packages/andydune-object-cache-proxy/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

ObjectCacheProxy
================

[](#objectcacheproxy)

[![Build Status](https://camo.githubusercontent.com/33e1a323771a93acdeb51cf2f5768360f7cf93a54cca26abf91c0435ac126cc7/68747470733a2f2f7472617669732d63692e6f72672f416e647944756e652f4f626a656374436163686550726f78792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/AndyDune/ObjectCacheProxy)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/1b37c39c2a4fe6e7557600c0cb87c0ad855e8fb74d7c6a6be4c02b63d12b2aed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e647964756e652f6f626a6563742d63616368652d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andydune/object-cache-proxy)[![Total Downloads](https://camo.githubusercontent.com/bc3d4e3a3e49a47123089b0b1fda56ac0e59b249804835f74d20762816c2ce30/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e647964756e652f6f626a6563742d63616368652d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andydune/object-cache-proxy)

Allow cache results for execution object method. Transparent to working code.

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

[](#installation)

Installation with composer:

```
composer require andydune/object-cache-proxy

```

Or if composer didn't install globally:

```
php composer.phar require andydune/object-cache-proxy

```

Or edit your `composer.json`:

```
"require" : {
     "andydune/object-cache-proxy": "^1"
}

```

And execute command:

```
php composer.phar update

```

Problem
-------

[](#problem)

Here is instance of any class. We use setters for inject data and finally execute the last method for retrieve data. We do it often with narrow range of input data. How can we simple to change it for speedup?

```
$instance = new Adventures(); // any class

// Use some setters
$instance->setDirection('up');
$instance->setSpeed('low');
$instance->setLimit(13);

// Next is results
$ways = $instance->get();
```

We can use `ObjectCacheProxy` to cache it with minimum work code change.

```
use AndyDune\ObjectCacheProxy\ObjectCacheProxy;
use Symfony\Component\Cache\Simple\FilesystemCache;

$instanceOrigin = new \Adventures(); // any class

$instance = new ObjectCacheProxy(new FilesystemCache());

// inject object and method name witch results will be cached.
$instance->setObject($instanceOrigin, 'get');

// Use some setters
$instance->setDirection('up');
$instance->setSpeed('low');
$instance->setLimit(13);

// Next is results
$ways = $instance->get();
```

`ObjectCacheProxy` gets work class instance and intercept methods are called to it. It accumulates setter methods and parameters as cache key and executes them at ones before execution method `get`.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~8 days

Total

3

Last Release

2892d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.1

v1.1.1PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/79da3b2173a2cefb36abc9b4707cf2c633df8f2c748633ccf64186f5c0e7be6c?d=identicon)[AndyDune](/maintainers/AndyDune)

---

Top Contributors

[![AndyDune](https://avatars.githubusercontent.com/u/3772910?v=4)](https://github.com/AndyDune "AndyDune (12 commits)")

---

Tags

cachephpphp7phparray

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[awssat/laravel-visits

Laravel Redis visits counter for Eloquent models

975163.6k2](/packages/awssat-laravel-visits)[swayok/alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea. Powered by cache pool implementations provided by http://www.php-cache.com/

202541.1k6](/packages/swayok-alternative-laravel-cache)[swoft/redis

swoft redis component

12168.4k16](/packages/swoft-redis)[eftec/cacheone

A Cache library with minimum dependency

103.5k4](/packages/eftec-cacheone)

PHPackages © 2026

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