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 today

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

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

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

[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)
