Cache::set()
Create a new cache file.
Cache::set(string $id, callable $fn, array $lot = []): array;
Example:
$A = Cache::set('foo', function() {
return date('Y-m-d H:i:s');
});
$B = Cache::set($f = '.\lot\path\to\file.php', function() use($f) {
ob_start();
require $f;
return ob_get_clean();
});
Result:
$A = ['2022-08-16 11:50:17', '.\lot\cache\8c736521.php', 1549080564];
$B = ['Content of file.php', '.\lot\cache\path\to\file.php.php', 1549080564];