PHP code example of snicco / better-wp-cache-bundle
1. Go to this page and download the library: Download snicco/better-wp-cache-bundle 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/ */
snicco / better-wp-cache-bundle example snippets
// /path/to/configuration/bundles.php
use Snicco\Bundle\BetterWPCache\BetterWPCacheBundle;
use Snicco\Component\Kernel\ValueObject\Environment;
return [
'bundles' => [
Environment::ALL => [
BetterWPCacheBundle::class
]
]
];
use Cache\TagInterop\TaggableCacheItemInterface;
use Psr\Cache\CacheItemPoolInterface;
use Psr\SimpleCache\CacheInterface;
use Snicco\Component\Kernel\Kernel;
/**
* @var Kernel $kernel
*/
$kernel->boot();
$psr6_cache = $kernel->container()->make(CacheItemPoolInterface::class);
$psr16_cache = $kernel->container()->make(CacheInterface::class);
$taggable_cache = $kernel->container()->make(TaggableCacheItemInterface::class);