<?php
//load the cache file
require_once 'init.php';
$apcu = new Lablnet\APCU();
/* APCU usage */
//store
$apcu->add('name', 'malik');
$apcu->add('age', 25);
$apcu->add('email', 'lablnet01@gmail.com');
//store and override existance
$apcu->addOverride('age', 17);
//update the record/value
$apcu->update('name', 'malik', 'Malik Umer Farooq');
//get the cache value
var_dump($apcu->get('name'));
//delete the cache value
$apcu->delete('email');
//checking is cache is exists
var_dump($apcu->isCached('age'));
//apcu cache info
echo '<br>';
var_dump($apcu->apucInfo());
//delete the all cache data
$apcu->deleteMaster();
|