akalod / cache
Basic Cache Module
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/akalod/cache
Requires
- predis/predis: ^1
This package is auto-updated.
Last update: 2025-10-07 01:08:09 UTC
README
basic redis cache operator
install
composer require akalod/cache
examples
use Akalod/Cache; //init redis connection Cache::init(); //host, port, authPass, //set Default cacheTime Cache::cacheTime = 200; //set Cache::set('key','value',400); // key, value, cacheTime //get Cache::get('key'); //set and get with callback example $result = Cache::getSet('keyName', function () { //value return DB::table('pages') ->where('status', 1) ->where('group', 1) ->orderBy('short', 'asc') ->get(['seo', 'title', 'page_title']); }, 700); //key, callback, cacheTime