Function cache
Reads/writes temporary data to cache files or session.
Package: Cake
Deprecated: 3.0.0 Will be removed in 3.0. Please use Cache::write() instead.
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Located at Cake/basics.php
Deprecated: 3.0.0 Will be removed in 3.0. Please use Cache::write() instead.
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
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
-
mixed
The contents of the temporary file.
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.10/function-cache.html