public function behaviors() { return [TimestampBehavior::className(), ['class' => UploadBehavior::className(), 'attribute' => 'image', 'pathAttribute' => 'path', 'baseUrlAttribute' => 'base_url', 'typeAttribute' => 'type'], 'cacheInvalidate' => ['class' => CacheInvalidateBehavior::className(), 'cacheComponent' => 'frontendCache', 'keys' => [function ($model) { return [WidgetCarousel::className(), $model->carousel->key]; }]]]; }
public function behaviors() { return ['cacheInvalidate' => ['class' => CacheInvalidateBehavior::className(), 'keys' => [function ($model) { return [self::className(), $model->key]; }]]]; }
public function behaviors() { return ['cacheInvalidate' => ['class' => CacheInvalidateBehavior::className(), 'cacheComponent' => 'frontendCache', 'keys' => [function ($model) { return [get_class($model), $model->key]; }]]]; }
public function behaviors() { return [TimestampBehavior::className(), ['class' => UploadBehavior::className(), 'attribute' => 'image'], 'cacheInvalidate' => ['class' => CacheInvalidateBehavior::className(), 'keys' => [function ($model) { return [WidgetCarousel::className(), $model->carousel->key]; }]]]; }