common/components/statistics/service/Statistic.php
/**
     * Stores statistical data in cache
     *
     * @param  string          $hash
     * @param  StatisticalData $data
     * @return boolean
     */
Stores statistical data in cache
@param  string          $hash
@param  StatisticalData $data
@return boolean
Stores statistical data in cache @param string $hash @param StatisticalData $data @return boolean
private function storeInCache($hash, $data)
    {
        if (!($data instanceof StatisticalData)) {
            throw new InvalidParamException('Data should be instance of StatisticalData');
        }
        if ($this->useCache && Yii::$app->has('cache')) {
            return Yii::$app->cache->set($hash, $data, $this->cacheDuration);
        } else {
            return false;
        }
    }
private function storeInCache ( $ hash , $ data ) { if ( ! ( $ data instanceof StatisticalData ) ) { throw new InvalidParamException ( 'Data should be instance of StatisticalData' ) ; } if ( $ this -> useCache && Yii :: $ app -> has ( 'cache' ) ) { return Yii :: $ app -> cache -> set ( $ hash , $ data , $ this -> cacheDuration ) ; } else { return false ; } }
Stores statistical data in cache
 @param  string          $hash
 @param  StatisticalData $data
 @return boolean
Stores statistical data in cache @param string $hash @param StatisticalData $data @return boolean