Реализовано кэширование ответа /api/options

This commit is contained in:
ErickSkrauch 2016-12-02 11:38:53 +03:00
parent 0a0cca0834
commit ffd4a9000f

View File

@ -1,6 +1,7 @@
<?php
namespace api\controllers;
use api\filters\NginxCache;
use Yii;
use yii\helpers\ArrayHelper;
@ -11,6 +12,12 @@ class OptionsController extends Controller {
'authenticator' => [
'except' => ['index'],
],
'nginxCache' => [
'class' => NginxCache::class,
'rules' => [
'index' => 3600, // 1h
],
],
]);
}