PHP code example of mitogh / on-cache-please

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

    

mitogh / on-cache-please example snippets


composer 




$args = array(
    'name' => 'codepen_jobs',
	'callback' => function(){
		$url = 'http://codepen.io/jobs.json';
		return wp_remote_retrieve_body( wp_remote_get( $url ) );
	},
);
$jobs = mitogh\OnCache::please( $args );


$args = array(
    'name' => 'codepen_jobs',
	'callback' => function(){
		$url = 'http://codepen.io/jobs.json';
		return wp_remote_retrieve_body( wp_remote_get( $url ) );
	},
);
$jobs = mitogh\OnCache::please( $args );