PHPackages                             mvaliolahi/cache-sync - 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. mvaliolahi/cache-sync

ActiveLibrary

mvaliolahi/cache-sync
=====================

PHP Cache synchronization library.

v0.0.1(6y ago)09[1 PRs](https://github.com/mvaliolahi/cache-sync/pulls)MITPHPCI passing

Since Dec 9Pushed 4w ago1 watchersCompare

[ Source](https://github.com/mvaliolahi/cache-sync)[ Packagist](https://packagist.org/packages/mvaliolahi/cache-sync)[ Docs](https://mvaliolahi.ir)[ RSS](/packages/mvaliolahi-cache-sync/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

Cache-Sync
----------

[](#cache-sync)

[![Latest Stable Version](https://camo.githubusercontent.com/b8065b64ad07a3d8f29e93d3cb9059348456f5a4b93376fcbf7fab5a0bff6ab2/68747470733a2f2f706f7365722e707567782e6f72672f6d76616c696f6c6168692f63616368652d73796e632f762f737461626c65)](https://packagist.org/packages/mvaliolahi/cache-sync)[![Total Downloads](https://camo.githubusercontent.com/6fd6638daa8ee23b911d8ccc13a65248ee7ea29b80bd9217492c989c24f24aff/68747470733a2f2f706f7365722e707567782e6f72672f6d76616c696f6c6168692f63616368652d73796e632f646f776e6c6f616473)](https://packagist.org/packages/mvaliolahi/cache-sync)[![Build Status](https://camo.githubusercontent.com/bd9665a11dd0b1ec529c84af265c8eabb84e36a00ed61a3b779ba99e2d2cdf90/68747470733a2f2f7472617669732d63692e6f72672f6d76616c696f6c6168692f63616368652d73796e632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mvaliolahi/cache-sync)[![PHPStan](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/phpstan/phpstan)

synchronize cache data using elegant syntax!

###### Install

[](#install)

```
    composer require mvaliolahi/cache-sync
```

###### Setup

[](#setup)

```
    $cacheSync = new CacheSync(ArrayDriver::class);
```

- note: ArrayDriver can be replaced with any implementation of 'Mvaliolahi\\CacheSync\\Contracts\\CacheSyncDriver'.

###### Update single key inside array

[](#update-single-key-inside-array)

```
        $data = [
            'name' => 'Meysam Valiolahi',
            'email' => 'mvaliolahi@gmail.com',
        ];

        $updatedData = $this->cacheSync
            ->data($data)
            ->change('name', 'Sohrab Valiolahi')
            ->change('email', 'sohrab_valiolahi@gmail.com')
            ->get()
```

###### Update Nested key inside array

[](#update-nested-key-inside-array)

```
        $data = [
            'data' => [
                'houses' => [
                    [
                        'id' => 101,
                        'location' => 'Dubai'
                    ],
                    [
                        'id' => 102,
                        'location' => 'Germany'
                    ]
                ]
            ]
        ];

        $this->cacheSync
            ->data($data)
            ->change('data.houses@id=101', [
                'location' => 'Iran'
            ])
            ->get()
```

###### Persis changes

[](#persis-changes)

```
    $cacheSync->persistTo('users:user.1');
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance61

Regular maintenance activity

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2351d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d8a3eaee2623560bfdc9906358e1805abd4adf9fcd9170eba274fcfd8a51443?d=identicon)[mvaliolahi](/maintainers/mvaliolahi)

---

Top Contributors

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

---

Tags

cache synchronizationcache sync

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mvaliolahi-cache-sync/health.svg)

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

PHPackages © 2026

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