renoki-co / laravel-eloquent-query-cache

Adding cache on your Laravel Eloquent queries' results is now a breeze.
Apache License 2.0
1.06k stars 118 forks source link

redis cache, does not respect the time specified in $cacheFor #147

Closed GlauberF closed 2 years ago

GlauberF commented 2 years ago

I'm using redis as cache. package version: 2.4.2 Laravel ^7.22.4

my .env REDIS_HOST=redis REDIS_PASSWORD="1" REDIS_PORT=6379

CACHE_TTL=-1

my settings I have a standard model file which I extend to the other models. In this default file I define the settings below.

Captura de Tela_selecionar área_20220627154546

Even I set 1s(1000), for minutes to expire

records on redis Captura de Tela_selecionar área_20220627163804

checking the ttl of a record Captura de Tela_selecionar área_20220627164058

What I noticed is being saved without 1 second ttl specified in $cacheFor.