PHP code example of rekalogika / psr-16-simple-cache-bundle

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

    

rekalogika / psr-16-simple-cache-bundle example snippets


use Psr\SimpleCache\CacheInterface;

class SomeService
{
    public function __construct(private CacheInterface $cache)
    {
    }

    public function doSomething()
    {
        $this->cache->set('foo', 'bar');
    }
}