PHP code example of trt / doctrine-encrypted-cache

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

    

trt / doctrine-encrypted-cache example snippets



$doctrineCache = new \Doctrine\Common\Cache\ApcCache();

$encodedCache = new \Trt\Doctrine\Cache\Provider\CacheProviderDecorator(
    $doctrineCache,
    new \Trt\Doctrine\Cache\Encryptor\Encryptor('my_key')
);

$encodedCache->save('id', .... );

$encodedCache->fetch('id');