mirror of
https://github.com/elyby/accounts.git
synced 2024-11-30 10:42:16 +05:30
Реализовано кэширование ответа /api/options
This commit is contained in:
parent
0a0cca0834
commit
ffd4a9000f
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace api\controllers;
|
namespace api\controllers;
|
||||||
|
|
||||||
|
use api\filters\NginxCache;
|
||||||
use Yii;
|
use Yii;
|
||||||
use yii\helpers\ArrayHelper;
|
use yii\helpers\ArrayHelper;
|
||||||
|
|
||||||
@ -11,6 +12,12 @@ class OptionsController extends Controller {
|
|||||||
'authenticator' => [
|
'authenticator' => [
|
||||||
'except' => ['index'],
|
'except' => ['index'],
|
||||||
],
|
],
|
||||||
|
'nginxCache' => [
|
||||||
|
'class' => NginxCache::class,
|
||||||
|
'rules' => [
|
||||||
|
'index' => 3600, // 1h
|
||||||
|
],
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user