PHP code example of cache.lot / client
1. Go to this page and download the library: Download cache.lot/client 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/ */
cache.lot / client example snippets
use Cachelot\Action as Cachelot;
//Connect ro server
$Cachelot = new Cachelot("127.0.0.1", 3000);
$Cachelot->set("car","hyundai"); //setting variable
echo $Cachelot->get("car") . "\n"; //getting the variable
echo $Cachelot->show() . "\n"; //getting list the keys
$Cachelot->set("bike",['ktm', 'yamaha', 'suzuki']); //setting variable in type array
print_r($Cachelot->get("bike")); //get value array
$Cachelot->del("bike"); //delete value
$Cachelot->die("bike",5); //setting the lifetime of the variable
$Cachelot->close();