PHPackages                             rnr1721/le7-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. [Framework](/categories/framework)
4. /
5. rnr1721/le7-cache

ActiveLibrary[Framework](/categories/framework)

rnr1721/le7-cache
=================

PSR-16 SimpleCache for Le7 framework or any other PHP projects

1.0.6(2y ago)014610MITPHPPHP &gt;=8.1

Since Mar 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/rnr1721/le7-cache)[ Packagist](https://packagist.org/packages/rnr1721/le7-cache)[ RSS](/packages/rnr1721-le7-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (8)Used By (10)

PSR-16 implementation of SimplaCache for le7 framework or any PHP project
=========================================================================

[](#psr-16-implementation-of-simplacache-for-le7-framework-or-any-php-project)

Requirements
------------

[](#requirements)

- PHP 8.1 or higher.
- Composer 2.0 or higher.

What it can?
------------

[](#what-it-can)

- Standard implementation of PSR-16 Simple Cache
- Out of the box can use Filesystem, memory and session adapters
- As another package (rnr1721/le7-cache-memcache) present memcache and memcached

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

[](#installation)

```
composer require rnr1721/le7-cache
```

How it works?
-------------

[](#how-it-works)

```
use Core\Cache\SCFactoryGeneric;

$cacheFactory = new SCFactoryGeneric();

$cache = $cacheFactory->getFileCache('./cache');

$data = [
    'value1' => 'The 1 value',
    'value2' => 'The 2 value'
    ];

// Put data in cache
// Set cache key, value and time-to-live
$cache->set('mykey', $data, 5000);

// Get value from cache
$result = $cache->get('mykey');

print_r($result);
```

implemented methods
-------------------

[](#implemented-methods)

```
use Psr\SimpleCache\CacheInterface;

    public function get(string $key, mixed $default = null): mixed;

    public function set(string $key, mixed $value, null|int|DateInterval $ttl = null): bool;

    public function delete(string $key): bool;

    public function clear(): bool;

    public function getMultiple(iterable $keys, mixed $default = null): iterable;

    public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null): bool;

    public function deleteMultiple(iterable $keys): bool;

    public function has(string $key): bool;
```

factory methods
---------------

[](#factory-methods)

```
use Core\Interfaces\SCFactory;

    /**
     * Get filesysyem cache
     * @param string $folder Folder for caache
     * @return CacheInterface
     */
    public function getFileCache(string $folder): CacheInterface;

    /**
     * Get memory cache
     * @return CacheInterface
     */
    Public function getMemory(): CacheInterface;

    /**
     * Get Session cache
     * @return CacheInterface
     */
    public function getSession(): CacheInterface;
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

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

Every ~10 days

Total

7

Last Release

1093d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b056f4160d8f9302378726a35860b42bfa67c29760bb55fcacddfde2bfa6f6ac?d=identicon)[rnr1721](/maintainers/rnr1721)

---

Top Contributors

[![rnr1721](https://avatars.githubusercontent.com/u/122087344?v=4)](https://github.com/rnr1721 "rnr1721 (1 commits)")

---

Tags

frameworkcachecomponentle7le7-framework

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rnr1721-le7-cache/health.svg)

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

###  Alternatives

[yiisoft/cache-memcached

Yii Caching Library - Memcached Handler

1316.2k](/packages/yiisoft-cache-memcached)[yiisoft/cache-redis

Yii Caching Library - Redis Handler

1012.9k](/packages/yiisoft-cache-redis)[yiisoft/cache-db

Yii Caching Library - DB Handler

136.6k](/packages/yiisoft-cache-db)[yiisoft/cache-apcu

Yii Caching Library - APCu Handler

136.5k](/packages/yiisoft-cache-apcu)

PHPackages © 2026

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