Redis for cache/mutex throwing 500 error

Lakjin

Active Member
I followed the directions at https://www.mailwizz.com/kb/using-redis-cache-mutexes/. But when I add this...

Code:
'cache' => array(
        'class' => 'common.components.cache.RedisCache',
    ),
    'mutex' => array(
        'class' => 'common.components.mutex.RedisMutex',
    ),
...to main-custom.php, MailWizz stops loading and throws a http 500 error code. It goes back to normal if I exclude the code.

I have confirmed (using https://gist.github.com/raphaelstolt/402018) that redis is successfully running on localhost at 6379.
 
This is the error command line throws after adding the redis cache code to main-custom.php:

Code:
CException: Property "CConsoleApplication.cache" is read only. in /path/to/vendor/yiisoft/yii/framework/base/CComponent.php:169
Stack trace:
#0 /path/to/vendor/yiisoft/yii/framework/base/CModule.php(520): CComponent->__set('cache', Array)
#1 /path/to/vendor/yiisoft/yii/framework/base/CApplication.php(166): CModule->configure(Array)
#2 /path/to/vendor/yiisoft/yii/framework/YiiBase.php(132): CApplication->__construct(Array)
#3 /path/to/vendor/yiisoft/yii/framework/YiiBase.php(120): YiiBase::createApplication('CConsoleApplica...', Array)
#4 /path/to/apps/init.php(183): YiiBase::createConsoleApplication(Array)
#5 /path/to/apps/console/console.php(23): require_once('/path/to...')
#6 {main}
 
wow, im a moron, cant believe i missed that. it works now!

question. how do I remove the cache and mutexes that were saved to disk before? can I just delete the files in /apps/common/runtime/cache and /apps/common/runtime/mutex?
 
Back
Top