1. Go to this page and download the library: Download oanhnn/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/ */
// cache the results of this query for a day
$this->Post->find('all', array(
'conditions' => array('Post.name LIKE' => '%awesome%'),
'cache' => array(
'config' => '_cake_queries_',
'gzip' => false,
'key' => 'key_of_cache',
'duration' => '+1 days'
),
));
// don't cache the results of this query at all
$this->Post->find('all', array(
'conditions' => array('Post.name LIKE' => '%lame%'),
'cache' => false
));
// cache using the default settings even if auto = false
$this->Post->find('all', array(
'conditions' => array('Post.name LIKE' => '%okay i guess%'),
'cache' => true
));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.