PHP code example of arc / cache

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

    

arc / cache example snippets


    $cachedObject = \arc\cache::proxy( new heavyClass() );
    $result = $cachedObject->aHeavyCall();

    $cachedHTTPClient = \arc\cache::proxy( \arc\http::client(), function($params) {
        return ( \arc\http\headers::parseCacheTime( $params['target']->responseHeaders ) );
    });