Closed praseodym closed 1 year ago
Isn't memcached use for caching instead of sessions? 🤔
Default for sessions is db storage: so just don't set it for production should be the way to go for this
SESSION_ENGINE = env("SESSION_ENGINE", default="django.contrib.sessions.backends.db")
Production config is as follows:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'localhost:11211',
'KEY_PREFIX': 'dienst2',
}
}
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
And I don't think the cache is used anywhere else?
Django does some automatic caching for some stuff, but not sure what exactly 😅
We could also switch the cache to db or maybe local memory
Local memory cache + sessions in database sounds like the way to go.
Resolved with https://github.com/WISVCH/dienst2/pull/311
Let's just create sessions in the database instead of deploying memcached.