This is a collection of utilities for the PSR-16 and PSR-6 caching standards.
composer require cache/utilusefunctionCache\Util\SimpleCache\remember;
$cache = newSimpleCache(); // some simple cache interface// if the result exists at the key, it'll return from cache, else it'll execute the callback and store in cache and return.$res = remember($cache, 'key', 3600, function() {
returnsomeExpensiveOperation();
});Contributions are very welcome! Send a pull request to the main repository or report any issues you find on the issue tracker.
