PHP code example of aidarkolbaev / memclient
1. Go to this page and download the library: Download aidarkolbaev/memclient 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/ */
aidarkolbaev / memclient example snippets
$memcached = new \MClient\Memcached();
// In seconds
$expiration = 30;
// to store data
$memcached->set("key", "value", $expiration);
// to retrieve data
$memcached->get("key");
// to delete data
$memcached->delete("key");
// to enable asynchronous mode
$memcached->async(true);
// Retrieves data called by get() method in asynchronous mode
$memcached->receive();