PHP code example of userfrosting / cache

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

    

userfrosting / cache example snippets


use UserFrosting\Cache\MemcachedStore;

...

$cacheStore = new MemcachedStore("global", [
  'host' => '123.456.789.0',
  'port' => '22122'
]);
$cache = $cacheStore->instance();

$cache->get(...);

use UserFrosting\Cache\RedisStore;

...

$cacheStore = new RedisStore("global", [
  'password' => 'MyAwesomePassword',
  'port' => '1234'
]);
$cache = $cacheStore->instance();

$cache->get(...);