mirror of
https://github.com/elyby/accounts.git
synced 2024-11-30 02:32:26 +05:30
Реализовано кэширование ответа /api/options
This commit is contained in:
parent
0a0cca0834
commit
ffd4a9000f
@ -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
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user