store\components\behaviors\DCategoryBehavior::cached PHP Method

cached() protected method

protected cached ( null $model = null ) : CComponent | null
$model null
return CComponent | null
    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;
    }