Beispiel #1
0
 /**
  * Stores a value identified by a key in cache.
  * This is the implementation of the method declared in the parent class.
  *
  * @param string $key the key identifying the value to be cached
  * @param string $value the value to be cached
  * @param integer $expire 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
  */
 protected function setValue($key, $value, $expire)
 {
     try {
         $cacheResult = $this->_yiiron->cachePutItem($this->yiironCacheName, $key, array("value" => $value, 'expires_in' => $expire));
         return true;
     } catch (Exception $e) {
         Yii::log($e->getMessage(), CLogger::LEVEL_ERROR, "ext.yiiron");
         return false;
     }
 }