PHP code example of andydune / object-cache-proxy
1. Go to this page and download the library: Download andydune/object-cache-proxy 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/ */
andydune / object-cache-proxy example snippets
$instance = new Adventures(); // any class
// Use some setters
$instance->setDirection('up');
$instance->setSpeed('low');
$instance->setLimit(13);
// Next is results
$ways = $instance->get();
use AndyDune\ObjectCacheProxy\ObjectCacheProxy;
use Symfony\Component\Cache\Simple\FilesystemCache;
$instanceOrigin = new \Adventures(); // any class
$instance = new ObjectCacheProxy(new FilesystemCache());
// inject object and method name witch results will be cached.
$instance->setObject($instanceOrigin, 'get');
// Use some setters
$instance->setDirection('up');
$instance->setSpeed('low');
$instance->setLimit(13);
// Next is results
$ways = $instance->get();
php composer.phar update