PHP code example of cable / cable-caching
1. Go to this page and download the library: Download cable/cable-caching 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/ */
cable / cable-caching example snippets
$container = Factory::create();
$container->addProvider(CachingProvider::class);
$container->addProvider(MemcacheDriverProvider::class);
$cache = Caching::create($container);
$memcache = $cache->driver('memcache');
$container = Factory::create();
$container->addProvider(CachingProvider::class);
$container->addProvider(RedisDriverProvider::class);
$cache = Caching::create($container);
$memcache = $cache->driver('redis');
$container = Factory::create();
$container->addProvider(CachingProvider::class);
$cache = Caching::create($container);
$memcache = $cache->driver('array');