Exemple #1
0
 /**
  * Simple wrapper around parent `setAndSave()` that invalidates cache on
  * save.
  *
  * @param array $attributes Attributes to be saved.
  *
  * @return bool True on success, false otherwise.
  * @since 0.1.0
  */
 public function setAndSave(array $attributes)
 {
     if (parent::setAndSave($attributes)) {
         \Yii::app()->cacheHelper->invalidatePostsCache();
         return true;
     }
     return false;
 }