1๐
I have had the exact same issue. While I am still trying to get to the exact bottom of it, I have found some useful things.
-
Older versions of johnny cache work. Since I need master/slave setups to work, I used this fork: https://bitbucket.org/skoczen/johnny-cache It only includes commits up to November, so the problem is introduced after that.
-
On the admin pages, the error is caused by the auth_user and auth_table table caches. Adding these to the JOHNNY_BLACKLIST circumvents the issue, and also disables caching for those tables. I doubt the issue is unique to those tables, so Iโm blacklisting those tables is not a good solution.
I have checked my configuration and tried many things, just like you and that is not the problem.
Hope this helps.
Edit:
More digging has revealed that the issue crops up with this commit bcdb46c5d357, which added code to cache queries returning null: https://bitbucket.org/jmoiron/johnny-cache/changeset/bcdb46c5d357
If you stick to an earlier one, it should work.
0๐
Then the ordering of middlewares could be the reason of the error, try
'johnny.middleware.LocalStoreClearMiddleware',
'johnny.middleware.QueryCacheMiddleware', # Here
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Probably you need this for transaction, later
# 'johnny.middleware.CommittingTransactionMiddleware',
The 'johnny.middleware.QueryCacheMiddleware'
should be initialized and thus be placed before other middlewares. 'johnny.middleware.LocalStoreClearMiddleware'
only deals w/ response and exception, thus it could be the first.
- [Django]-Django Multiple Levels Choices for Field
- [Django]-Create a facebook notification with Django package facepy : [15] (#15) This method must be called with an app access_token
- [Django]-Monitoring django postgres connections
- [Django]-Manage.py doesn't pass the argument to the command
- [Django]-Django aggregation over annotated query