Utilizando cache de django

This commit is contained in:
Daniel Cortes
2020-06-08 02:10:01 -04:00
parent 6498bf9c48
commit 0d2d23e2e1
3 changed files with 21 additions and 15 deletions

View File

@@ -77,6 +77,21 @@ DATABASES = {
}
}
"""Cache configuration"""
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
},
"KEY_PREFIX": "DJANGO_SERVER"
}
}
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "default"
"""How to validate password security"""
AUTH_PASSWORD_VALIDATORS = [
{