PHP code example of phyrexia / cache

1. Go to this page and download the library: Download phyrexia/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/ */

    

phyrexia / cache example snippets



Phyrexia\Cache\Memcached;

//First call: generate instance (next calls won't need parameters, Singleton <3)
$mc = Memcached::getInstance(HOST, PORT);

//Do stuff
$r = Memcached::getInstance()->set('key', 'value');