2015-09-22 25 views
2

配置nodge eauth緩存現在,我使用默認的緩存爲所有:如何Yii2

'cache' => [ 
    'class' => 'yii\caching\FileCache', 
], 

,而且我用nodge eauth註冊用戶。 預設配置nodge:

'components' => [ 
    'eauth' => array(
    'class' => 'nodge\eauth\EAuth', 
    'popup' => true, // Use the popup window instead of redirecting. 
    'cache' => false, // Cache component name or false to disable cache. Defaults to 'cache' on production environments. 
    'cacheExpire' => 0, // Cache lifetime. Defaults to 0 - means unlimited. 
) 
] 

我應該指定cache

+0

將其保留爲假。如果你不想使用緩存。 否則使用'緩存' - 組件ID(在這個組件被設置爲'緩存')。 –

+0

如果我的答案有助於將其標記爲正確答案 –

回答

0

如果你想緩存請求,你的配置應該是

'eauth' => [ 
      'class' => 'nodge\eauth\EAuth', 
      'popup' => false, // Use the popup window instead of redirecting. 
      'cache' => 'cache', // Cache component name or false to disable cache. Defaults to 'cache' on production environments. 
      'cacheExpire' => 0, // Cache lifetime. Defaults to 0 - means unlimited.] 

但我可能是錯的。