PHP code example of akiyatkin / boo
1. Go to this page and download the library: Download akiyatkin/boo 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/ */
akiyatkin / boo example snippets
use akiyatkin\boo\Cache;
$args = array($one, $two); //простые, необязательные параметры идентифицирующие кэш
$data = Cache::exec('Group title', function ($one, $two) {
$data = sleep(5); //Что-то долгое
//$one и $two чаще всего какие-то идентификаторы.
//Можно указать более понятный title для кэша текущей обработки
Cache::setTitle($title);
return $data; //нерекурсивные кэшируемые данные
}, $args);