protected function cached($model = null)
{
if ($model === null) {
$model = $this->getOwner();
}
$connection = $model->getDbConnection();
return $this->useCache ? $model->cache($connection->queryCachingDuration, new \TagsCache($this->getCacheTag())) : $model;
}