Skip to content

Commit

Permalink
🔧 Add missing cache settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoerdie committed Mar 21, 2024
1 parent 3e3dd2e commit 78978b5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/objects/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,33 @@

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": f"redis://{config('CACHE_DEFAULT', 'localhost:6379/0')}",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"IGNORE_EXCEPTIONS": True,
},
},
"axes": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": f"redis://{config('CACHE_AXES', 'localhost:6379/0')}",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"IGNORE_EXCEPTIONS": True,
},
},
"oidc": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": f"redis://{config('CACHE_OIDC', 'localhost:6379/0')}",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"IGNORE_EXCEPTIONS": True,
},
},
}

# Application definition

INSTALLED_APPS = [
Expand Down

0 comments on commit 78978b5

Please sign in to comment.