Ask Your Question

How to configure askbot with redis

asked 2013-05-20 14:33:23 -0600

kporangehat's avatar

updated 2013-05-20 18:41:26 -0600

Evgeny's avatar

I've got the github askbot-devel repo installed and running on Postgres 9.2. Now it appears that none of the settings I save on the settings page actually get saved. It's not intermittent, they never appear and there are no errors on the page or in the logs. I saw multiple references to this possibly being related to not having a cacheing system setup.

If I want to use redis, how do I configure askbot to work with it? I only see examples for memcached. Is memcached preferred?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-20 14:35:45 -0600

updated 2013-05-20 21:40:40 -0600

Evgeny's avatar

Use django-redis-cache just follow the project docs on the github README and it will work.

edit: these cache-related settings work on django 1.4.5.

CACHE_BACKEND = 'redis_cache.cache://localhost:6379'
CACHE_PREFIX = 'askbot2' #make this unique
edit flag offensive delete link more


This worked well for installing redis and getting it configured thank you.

However... it didn't solve the issue of my settings not being saved. None of my settings get saved from the settings page. No error is generated on the page, nor in the logs so I'm not sure where to go from here.

kporangehat's avatar kporangehat  ( 2013-05-20 18:35:42 -0600 )edit

That sounds odd. You might have duplicate configuration statements for cache and effectively you are still using locmem caching or redis server is not running, not configured correctly.

Evgeny's avatar Evgeny  ( 2013-05-20 18:40:54 -0600 )edit

I ran a cache test using the django shell as described in I have tested the redis client/server directly and they are working without error as well.

In my file I commented out all of the CACHE_* settings and only have:

    'default': {
        'BACKEND': 'redis_cache.RedisCache',
        'LOCATION': '',
        'OPTIONS': {
           'DB': 1,
            #'PASSWORD': 'yadayada',
            'PARSER_CLASS': 'redis.connection.HiredisParser'

(can't do code formatting in the comment I guess... sorry)

kporangehat's avatar kporangehat  ( 2013-05-20 19:04:41 -0600 )edit

Use this setting instead: CACHE_BACKEND = 'redis_cache.cache://<host>:<port>' the livesettings app has a dependency that use that setting in some part.

Fitoria's avatar Fitoria  ( 2013-05-20 19:06:44 -0600 )edit

I will look into fixing this config issue in the livesettings, did not know about this.

Evgeny's avatar Evgeny  ( 2013-05-20 19:11:52 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-05-20 14:33:23 -0600

Seen: 5,222 times

Last updated: May 20 '13