PHP code example of iron-io / iron_cache

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

    

iron-io / iron_cache example snippets





re_once "IronCache.class.php"


$cache = new IronCache(array(
    'token' => 'XXXXXXXXX',
    'project_id' => 'XXXXXXXXX'
));


$cache = new IronCache('config.ini');


$res = $cache->put("mykey", "hello world!");


$item = $cache->get("mykey");


$res = $cache->increment("mykey", 1);


$res = $cache->delete("mykey");


$cache = new IronCache();
$cache->set_as_session_store();

# Use session as usual
session_start();
...