The basic idea is that we check if the url is saved in cache, if it is then we read it in otherwise we must use curl to grab it.
CakePHP3’s Cache settings are in the config/app.php file;
/** * Configure the cache adapters. */ 'Cache' => [ 'default' => [ 'className' => 'File', 'path' => CACHE, 'url' => env('CACHE_DEFAULT_URL', null), 'duration' => '+60 minutes',//the duration object should cached for /*'prefix' => 'mycacheprefix_',*/ ],
CakePHP 3 Cache: