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