save() public method

Save some data in a cache file
public save ( string $data, string $id = null, string $group = 'default' ) : boolean
$data string data to put in cache (can be another type than strings if automaticSerialization is on)
$id string cache id
$group string name of the cache group
return boolean true if no problem
コード例 #1
0
ファイル: MessageCache.php プロジェクト: pradosoft/prado
 /**
  * Save the data to cache for the specified section and locale.
  * @param array $data The data to save.
  * @param string $catalogue The translation section.
  * @param string $culture The translation locale, e.g. "en_AU".
  */
 public function save($data, $catalogue, $culture)
 {
     $ID = $this->getID($catalogue, $culture);
     $group = $this->getGroup($catalogue, $culture);
     //echo '## Cache save: "'.$ID.'" : "'.$group.'"';
     //echo "<br>\n";
     return $this->cache->save($data, $ID, $group);
 }