Before using the cache, we must check that the cache is enabled or disabled in
application /Config/core.php.
we must uncomment this line in the core.php file
//Configure::write('Cache.disable', true);
After that we use
$varible = Cache::read('variable'); Cache::write('posts', $posts); Cache::delete();
Ranjeet
source share