PHP code example of fyre / cache

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

    

fyre / cache example snippets


use Fyre\Cache\Cache;

Cache::clear();

Cache::disable();

Cache::enable();

$config = Cache::getConfig($key);

$config = Cache::getConfig();

$key = Cache::getKey($cacher);

$hasConfig = Cache::hasConfig($key);

Cache::isEnabled();

$isLoaded = Cache::isLoaded($key);

$cacher = Cache::load($options);

Cache::setConfig($key, $options);

Cache::setConfig($config);

$unloaded = Cache::unload($key);

$cacher = Cache::use($key);

$value = $cacher->decrement($key, $amount);

$deleted = $cacher->delete($key);

$emptied = $cacher->empty();

$value = $cacher->get($key);

$has = $cacher->has($key);

$value = $cacher->increment($key, $amount);

$value = $cacher->remember($key, $callback, $expire);

$saved = $cacher->save($key, $value, $expire);

$size = $cacher->size();

Cache::setConfig($key, $options);

$cacher = Cache::use($key);

Cache::setConfig($key, $options);

$cacher = Cache::use($key);

Cache::setConfig($key, $options);

$cacher = Cache::use($key);