PHP code example of arabcoders / cache

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

    

arabcoders / cache example snippets




ter = new \arabcoders\cache\Adapters\Redis( [
    'port'      => 6379,
    'server'    => '127.0.0.1'
]);

$cache = new \arabcoders\cache\Cache( $adapter );

$cache->set( 'test', 'foo', 120 );

echo $cache->get('test')->getValue();