Ask Your Question

What is wrong with this cache setup?

asked 2015-05-07 04:23:51 -0500

kovszilard gravatar image

updated 2015-05-07 04:32:04 -0500

I have a problem with memcached setup. When i visit some pages anonymously everything works as expected, but after logging in all the previously visited pages looks like before authentication. This happens for example with /questions and the /users page. (I'm using ldap authentication, not sure if it has anything to do with this problem)

After clearing the cache by hand like this:

python shell
>>> from django.core.cache import cache
>>> cache.clear()

everything works perfectly.

here is the caching related part from my


    'default': {
            'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
            'LOCATION': '',
            'TIMEOUT': 60,
            'KEY_PREFIX': 'askbot',


The intresting thing that even the 60 second cache period is over, I still get this pages from cache and the sign out link doesn't show up on top of the page.

some version numbers: askbot: 0.7.53, Python 2.6.6, Memcached 1.4.4, RedHatEnterpriseServer 6.5

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-07 09:44:59 -0500

kovszilard gravatar image

According to django's documentation, there was a problem with Middleware ordering (link to doc)

Here is my working middleware config:

## Enable the following middleware if you want to enable
## language selection in the site settings.

#below is askbot stuff for this tuple


edit flag offensive delete link more

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: 2015-05-07 04:23:51 -0500

Seen: 2,808 times

Last updated: May 07 '15