如何在Yii2中为nodge eauth配置缓存

时间:2015-09-22 09:06:02

标签: caching yii2 yii-extensions yii-components

现在,我使用默认缓存:

'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指定什么?

1 个答案:

答案 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.]

但我错了。