PHPackages                             pavel-u/in-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. pavel-u/in-cache

ActiveLibrary[Caching](/categories/caching)

pavel-u/in-cache
================

Cache wrapper.

08PHP

Since Oct 19Pushed 11y ago1 watchersCompare

[ Source](https://github.com/pavel-u/InCache)[ Packagist](https://packagist.org/packages/pavel-u/in-cache)[ RSS](/packages/pavel-u-in-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

InCache
=======

[](#incache)

InCache is a simple tool which will going to represent cache as a new level of abstraction via DSL.

Installing
----------

[](#installing)

### Composer

[](#composer)

The fastest way to install InCache in your project is using Composer.

1. Install Composer:

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

    ```
2. Add InCache as a dependency to your `composer.json` file:

    ```
    {
        "require": {
            "pavel-u/in-cache": "dev-master"
        }
    }
    ```

Currently project is in the development state. So, "dev-master" version should be used.

1. Install InCache:

    ```
    php composer.phar install

    ```

Usage
-----

[](#usage)

### Configure Interceptor

[](#configure-interceptor)

Initialize InCache interceptor:

```
$interceptor = new \InCache\Interceptor;
```

Set Root path:

```
$interceptor->setRootPath(__DIR__)
```

Set path to the config file:

```
$interceptor->setConfigPath(realpath(__DIR__ . DIRECTORY_SEPARATOR . 'etc/cache.xml'))
```

Start to intercept methods calls:

```
$interceptor->listen()
```

Generate proxy classess. First parameter is used to process force code generation:

```
$interceptor->generate(true);
```

### Add config file

[](#add-config-file)

Here is an example of config file

```

```

Cache Driver MUST implements `Stash\Interfaces\DriverInterface` interface. Cache Pool MUST implements `Stash\Interfaces\PoolInterface`

Also, you could always check [XSD file](https://github.com/pavel-u/InCache/blob/master/src/InCache/cache.xsd) which will provide you more datails about DSL.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

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://www.gravatar.com/avatar/8815079cd7c4830c98c03ba88a68545c301093ac3808fa13bf85b8c24a174e1d?d=identicon)[pavel-u](/maintainers/pavel-u)

---

Top Contributors

[![pavel-u](https://avatars.githubusercontent.com/u/5797746?v=4)](https://github.com/pavel-u "pavel-u (9 commits)")

### Embed Badge

![Health badge](/badges/pavel-u-in-cache/health.svg)

```
[![Health](https://phpackages.com/badges/pavel-u-in-cache/health.svg)](https://phpackages.com/packages/pavel-u-in-cache)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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