xes / pcache
Wrapper for Predis to add GetOrSet
Installs: 124
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/xes/pcache
Requires
- predis/predis: ~1.0
This package is not auto-updated.
Last update: 2025-09-27 23:15:45 UTC
README
Installation
composer require xes/pcache
Usage
require 'vendor/autoload.php'; $predis = new Predis\Client(); $cache = new xes\Pcache($predis); $keyname = 'someKey'; $TTL = 60; echo $cache->get($keyname, $TTL, function() { // Some slow function such as a database call sleep(1); return 'hello world'; });