PHP code example of publishing-kit / cache

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

    

publishing-kit / cache example snippets


$factory = new PublishingKit\Cache\Factories\StashCacheFactory();
$cache = $factory->make([
        'driver' => 'redis',
        'servers' => [[
        '127.0.0.1',
        '6379'
    ]]
]);

$factory = new SymfonyCacheFactory();
$cache = $factory->make([
    'driver' => 'redis',
    'server' => 'redis://127.0.0.1:6379',
]);
 php
$wrapper = new PublishingKit\Cache\Services\Cache\Psr6Cache($cache);