PHPackages                             gsferro/autocacheeasy - 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. gsferro/autocacheeasy

AbandonedLibrary[Caching](/categories/caching)

gsferro/autocacheeasy
=====================

Package to perform the autocache in an easy way in Laravel with Redis

012PHP

Since May 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/GuilhermeFerro/laravel-autocache-easy)[ Packagist](https://packagist.org/packages/gsferro/autocacheeasy)[ RSS](/packages/gsferro-autocacheeasy/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Auto Cache Easy
=======================

[](#laravel-auto-cache-easy)

`EN`

- Package to perform the autocache in an easy way in Laravel with Redis
- This package was inspired by the `amitavroy/rediscache` and use it internally

`PT-BR`

- Pacote para realizar o autocache de uma forma easy no Laravel com Redis
- Este pacote foi inspirado no `amitavroy/rediscache` e o usa internamente

### Installation

[](#installation)

```
composer require gsferro/autocacheeasy

```

### Dependencies

[](#dependencies)

```
"predis/predis": "^1.1",

```

### Use

[](#use)

- Global instance `autocacheeasy()`

```
/**
* Package instance
* Instancia do pacote
*
* @param string $keyPrefix default null,
* @param string $keyPrefixSeparetor default ':'
* @return AutoCacheEasyService
*/
$autocacheeasy = autocacheeasy();
```

- Alias `autocache()`

```
/**
* Alias small for autocacheeasy().
*
* @return Gsferro\AutoCacheEasy\Services\AutoCacheEasyService
*/
$autocache = autocache();
```

- Method Remember

```
autocacheeasy()->remember(string $key, $ttl, \Closure $callback)
```

- Method RememberForever

```
autocacheeasy()->remember(string $key, $ttl, \Closure $callback)
```

- Method Retriver

```
autocacheeasy()->retriver(string $key, \Closure $callback, $all = false)
```

### Methods Packages Inspire/Dependencie

[](#methods-packages-inspiredependencie)

`EN`

- By using this package, you still retain all the functions of the dependency package.

`PT-BR`

- Ao usar este pacote, você ainda mantém todas as funções do pacote de dependência.

##### Method Package Depedence `\Illuminate\Cache\CacheManager`

[](#method-package-depedence-illuminatecachecachemanager)

`EN`

- To access the cache directly

`PT-BR`

- Para ter acesso ao cache diretamente

```
autocacheeasy()->cache
```

##### Method Package Depedence `predis/predis`

[](#method-package-depedence-predispredis)

`EN`

- To access the predis directly

`PT-BR`

- Para ter acesso ao predis diretamente

```
autocacheeasy()->redis
```

##### Method Package Inspire `amitavroy/rediscache`

[](#method-package-inspire-amitavroyrediscache)

```
autocacheeasy()->get($key)

autocacheeasy()->set($key, $value)

autocacheeasy()->getAll($key)

autocacheeasy()->forget($key, $wildcard = false)
```

### Package `ResponseView`

[](#package-responseview)

`EN`

- Response easy the dates from views
- add Trait `ResponseViewCache` in your Controller

`PT-BR`

- Forma fácil de adicionar dados para o response de views
- Adicionar a trait `ResponseViewCache` no seu Controller
- url:
- Method `addDataCache`

```
/**
* Easily add an item to ResponseView :: $ data and cache it
* Adicionar forma fácil um item ao ResponseView::$data e coloca no cache
*
* @param string $key
* @param callable $value
* @param int $time 60
*/
$this->addDataCache(string $key, callable value, int $time 60)
```

- Method `addMergeDataCache`

```
/**
* Easily add an item to ResponseView::$mergeData and cache it
* Adicionar forma fácil um item ao ResponseView::$mergeData e coloca no cache
*
* @param string $key
* @param callable $value
* @param int $time 60
*/
$this->addMergeDataCache(string $key, callable value, int $time 60)
```

- Method `addDataOtherKeyCache`

```
/**
* Easily add an item to ResponseView::$data and cache it
* Adicionar forma fácil um item ao ResponseView::$data e coloca no cache
*
* @param string $key
* @param string $keyCache
* @param callable $value
* @param int $time 60
*/
$this->addDataOtherKeyCache( string $key, string $keyCache, callable value, int $time 60 )
```

- Method `addMergeDataOtherKeyCache`

```
/**
* Easily add an item to ResponseView::$mergeData and cache it
* Adicionar forma fácil um item ao ResponseView::$mergeData e coloca no cache
*
* @param string $key
* @param string $keyCache
* @param callable $value
* @param int $time 60
*/
$this->addMergeDataOtherKeyCache( string $key, string $keyCache, callable value, int $time 60 )
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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/9857d9f527903d58285b8afd4c9cc5d4150041a5951ba5b84c399d0e579b0255?d=identicon)[gsferro](/maintainers/gsferro)

---

Top Contributors

[![gsferro](https://avatars.githubusercontent.com/u/12704346?v=4)](https://github.com/gsferro "gsferro (11 commits)")

### Embed Badge

![Health badge](/badges/gsferro-autocacheeasy/health.svg)

```
[![Health](https://phpackages.com/badges/gsferro-autocacheeasy/health.svg)](https://phpackages.com/packages/gsferro-autocacheeasy)
```

###  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)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

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