Function cache
Reads/writes temporary data to cache files or session.
Package: Cake
Deprecated: Please use Cache::write() instead
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Located at Cake/basics.php
Deprecated: Please use Cache::write() instead
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Located at Cake/basics.php
cache( string $path , mixed $data = null , mixed $expires = '+1 day' , string $target = 'cache' )
Parameters summary
string
$path
File path within /tmp to save the file.
mixed
$data = null
The data to save to the temporary file.
mixed
$expires = '+1 day'
A valid strtotime string when the data expires.
string
$target = 'cache'
The target of the cached data; either 'cache' or 'public'.
Returns
-
mixedThe contents of the temporary file.