setValue() protected method

This is the implementation of the method declared in the parent class.
protected setValue ( string $key, string $value, integer $duration ) : boolean
$key string the key identifying the value to be cached
$value string the value to be cached. Other types (If you have disabled [[serializer]]) unable to get is correct in [[getValue()]].
$duration integer the number of seconds in which the cached value will expire. 0 means never expire.
return boolean true if the value is successfully stored into cache, false otherwise
コード例 #1
0
ファイル: Base64Cache.php プロジェクト: vecherskyy/dom
 protected function setValue($key, $value, $duration)
 {
     $value = base64_encode($value);
     parent::setValue($key, $value, $duration);
 }
コード例 #2
0
ファイル: BZCache.php プロジェクト: scorp7mix/yii
 protected function setValue($key, $value, $duration)
 {
     $value = bzcompress($value);
     parent::setValue($key, $value, $duration);
 }