[Answer]-Django cache Bad Request (400)

1πŸ‘

βœ…

Went back to the docks and started playing around with the port number for the location.

Was able to make it report a different error that referenced 63894 as being the correct port number. Interesting to note that it was not the port the actual site was running off – 88. Maybe it was something to do with the fact that it was running with the django manage.py runserver command and was only a development server etc.

Anyway this fixed the problem. Code below as a reference.

CACHES = {
        'default': {
            'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
            'LOCATION': '127.0.0.1:63894',
        }
    }
πŸ‘€Red Shift

0πŸ‘

Adapted from previous response

The only possible reason I see in bad request error is due to misconfiguration of hosts settings as also discussed here.

Also to check for memcached, Please check this link.

πŸ‘€Gautam Bhalla

Leave a comment