/** * Before Delete, remove LikeCount (Cache) of target object. * Remove activity */ public function beforeDelete() { Yii::$app->cache->delete('likes_' . $this->object_model . "_" . $this->object_id); return parent::beforeDelete(); }
/** * @inheritdoc */ public function beforeDelete() { $this->flushCache(); return parent::beforeDelete(); }