PHP code example of oxhq / cachelet-core
1. Go to this page and download the library: Download oxhq/cachelet-core library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oxhq / cachelet-core example snippets
use Oxhq\Cachelet\Facades\Cachelet;
$report = Cachelet::for('reports.sales')
->from(['from' => '2026-01-01', 'to' => '2026-01-31'])
->onStore('redis')
->ttl('+30 minutes')
->remember(fn () => $service->salesReport());