PHPackages                             anst/cache-saver - 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. anst/cache-saver

ActiveLibrary[Caching](/categories/caching)

anst/cache-saver
================

Реализация PSR-16. Кэширование с использование базы дынных PostgreSQL

01PHP

Since Jun 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Stepanishcheva/CacheHelper)[ Packagist](https://packagist.org/packages/anst/cache-saver)[ RSS](/packages/anst-cache-saver/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

CacheHelper
===========

[](#cachehelper)

Реализация PSR-16 c хранением кэша в базе данных (PostgreSQL)

### Установка с помощью composer

[](#установка-с-помощью-composer)

> `composer require anst/cache-saver`

### Использование

[](#использование)

$cache = new CacheHelper($config);

Для подключения необходимо передать следущие параметры. **User, pass, dbname - обязательные параметры**.
$config = \[ 'host' =&gt; 'localhost', 'port' =&gt; 5432, **'user' =&gt; , 'pass' =&gt; , 'dbname' =&gt;,** 'table' =&gt; 'cache' \];

#### Доступные методы:

[](#доступные-методы)

1. Получение кэша по ключу `$cache->get($key, $default = null)`
2. Сохранение кэша с возможностью указания времени жизни `$cache->set($key, $value, $ttl = null)`
3. Удаление кэша по ключу `$cache->delete($key)`
4. Очистка кэша `$cache->clear()`
5. Проверка наличия кэша по ключу `$cache->has($key)`
6. Получение кэша по набору ключей `$cache->getMultiple($keys, $default = null)`
7. Сохранение кэша по набору ключей `$cache->setMultiple($values, $ttl = null)`
8. Удаление кэша по набору ключей `$cache->deleteMultiple($keys)`
9. **Дополнительный** метод для удаления мусора из бд(если время жизни кэша прошло, то это мусор) `$cache->collectGarbage()`

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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/520e7b66e8ae56937009310defb2f4938bddd1e398fa4d0e1f6d458868f9d4b1?d=identicon)[Stepanishcheva](/maintainers/Stepanishcheva)

---

Top Contributors

[![Stepanishcheva](https://avatars.githubusercontent.com/u/74156774?v=4)](https://github.com/Stepanishcheva "Stepanishcheva (2 commits)")[![AnastasiyaSt](https://avatars.githubusercontent.com/u/57727070?v=4)](https://github.com/AnastasiyaSt "AnastasiyaSt (1 commits)")

### Embed Badge

![Health badge](/badges/anst-cache-saver/health.svg)

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

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)

PHPackages © 2026

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