Skip to content

Commit

Permalink
Replace Yii::$app->get("cache") to (new Cache())
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Mar 29, 2016
1 parent 888335d commit 5c9846e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/DomaincheckerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace hipanel\modules\domainchecker\controllers;

use hipanel\base\Cache;
use hipanel\modules\domain\models\Domain;
use hipanel\modules\finance\models\Resource;
use hipanel\modules\finance\models\Tariff;
Expand Down Expand Up @@ -56,6 +57,7 @@ public function actionCheck()
*/
public function actionCheckDomain()
{
$smp = $this->getViewPath();
$results = [];
$model = new Domain();
$model->scenario = 'check-domain';
Expand Down Expand Up @@ -116,7 +118,7 @@ protected function getDomainTariff()
Yii::$app->user->isGuest ? null : Yii::$app->user->id,
];

return Yii::$app->get('cache')->getTimeCached(3600, $params, function ($seller, $client_id) {
return (new Cache())->getTimeCached(3600, $params, function ($seller, $client_id) {
return Tariff::find(['scenario' => 'get-available-info'])
->joinWith('resources')
->andFilterWhere(['type' => 'domain'])
Expand Down

0 comments on commit 5c9846e

Please sign in to comment.