Write

Navigation:  Development > Function Reference > Module > Cache >

Write

Previous pageReturn to chapter overviewNext page

Create a temporary cache data.
 

App::Module('Cache')->Write(Name, Value);
 

 

Parameter

Type

Description

Name

Mandatory

Name of the cache entry

Value

Mandatory

Value to write in cache

 

See bellow examples:

 

// Cache a String value
App::Module('Cache')->Write('mycache','Hello World');
 
// Create Cache of all pages
$data = App::Model('Page')->findAll();
App::Module('Cache')->Write('Pages', $data);