Ask Your Question

Askbot and memcached?

asked 2011-09-16 16:25:24 -0600

mether's avatar

updated 2011-09-16 20:52:36 -0600

Evgeny's avatar

Running a instance at with memcached and it seems buggy. If two people are logged in, I see in the frontpage as noone has logged in but if I go to the people page, I see the other person as logged in and if I go to the questions page, I see myself logged in. Something is buggy here but very fast compared to, without memcached.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-09-16 20:30:13 -0600

Evgeny's avatar

If you have have 'django.middleware.cache.UpdateCacheMiddleware', and it's twin 'django.middleware.cache.FetchFromCacheMiddleware', in the MIDDLEWARE_CLASSES then please remove them.

The effect you see is due to caching whole pages - including the header part on top.

Even without the page caching now you will get benefit from your memcached instance - because site settings are cached heavily. Settings are used many times in the course generating output.

We are planning some work to improve support of caching, some things can be done very easily.

edit flag offensive delete link more

answered 2011-09-17 07:34:32 -0600

mether's avatar

Thanks but this is still buggy. If I ask a question, it doesn't show up and the old cached page is shown instead. Sometimes when I go to the questions page I get a page not found instead and I have to refresh. This is problematic.

edit flag offensive delete link more


Could you verify that in runserver? AFAIK without the caching middlewares at this point pages in askbot won't be cached. It is possible that previous cached responses set very far in in the future "Expires" headers. Try deleting cache in the browser - does it help?

Evgeny's avatar Evgeny  ( 2011-09-17 07:51:55 -0600 )edit

Cleared the cache and that didn't fix the problem but I touched the wsgi file and seems to work fine now. Will test more but there seems to some issues here under the surface

mether's avatar mether  ( 2011-09-17 08:03:11 -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: 2011-09-16 16:25:24 -0600

Seen: 1,598 times

Last updated: Sep 17 '11