Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment: remove memcached #294

Closed
praseodym opened this issue Dec 13, 2021 · 5 comments
Closed

Deployment: remove memcached #294

praseodym opened this issue Dec 13, 2021 · 5 comments

Comments

@praseodym
Copy link
Member

Let's just create sessions in the database instead of deploying memcached.

@jgadelange
Copy link
Member

jgadelange commented Dec 13, 2021

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")

@praseodym
Copy link
Member Author

praseodym commented Dec 13, 2021

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?

@jgadelange
Copy link
Member

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

@praseodym
Copy link
Member Author

Local memory cache + sessions in database sounds like the way to go.

@JoepdeJong
Copy link
Contributor

Resolved with #311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants