1. Go to this page and download the library: Download arhone/cache 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/ */
arhone / cache example snippets
use arhone\caching\cacher\CacherFileSystemAdapter;
use arhone\caching\cacher\CacherRedisAdapter;
);
$cacher = new CacherRedisAdapter($redis);
use arhone\caching\cacher\CacherMemcachedAdapter;
calhost');
$cacher = new CacherMemcachedAdapter($memcached);
use arhone\caching\cacher\CacherFileSystemAdapter;
$cacher->get('key')) {
$data = 'Привет'; // Какой то сложный код, получающий данные
$cacher->set('key', $data);
}
echo $data;
$cacher->get(string $key); // Возвращает кэш по ключу
$cacher->set(string $key, $data, int $interval = null); // Сохраняет кэш по ключу. Можно задать время жизни в секундах.
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.