xes / pcache
There is no license information available for the latest version (1.2) of this package.
Wrapper for Predis to add GetOrSet
1.2
2015-06-20 19:05 UTC
Requires
- predis/predis: ~1.0
This package is not auto-updated.
Last update: 2025-05-10 20:58:02 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'; });