Skip to content

Commit

Permalink
refactor: drop django-redis in favor of built-in django redis support
Browse files Browse the repository at this point in the history
  • Loading branch information
infinitewarp committed Jun 24, 2024
1 parent 4fa211b commit 010aea4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
14 changes: 4 additions & 10 deletions config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,15 @@

DATABASES["default"] = env.db("DATABASE_URL")

# https://docs.djangoproject.com/en/dev/topics/cache/#redis
REDIS_URL = env("REDIS_URL", default="redis://127.0.0.1:6379")
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "{0}/{1}".format(
env("REDIS_URL", default="redis://127.0.0.1:6379"), 0
),
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"IGNORE_EXCEPTIONS": True, # mimics memcache behavior.
# http://niwinz.github.io/django-redis/latest/#_memcached_exceptions_behavior
},
"BACKEND": "django.core.cache.backends.redis.RedisCache",
"LOCATION": REDIS_URL,
}
}


# https://docs.djangoproject.com/en/dev/ref/settings/#logging
# http://docs.djangoproject.com/en/dev/topics/logging
LOGGING = {
Expand Down
20 changes: 1 addition & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ python = "^3.11"
Django = "^5.0.6"
django-environ = "^0.11.2"
django-model-utils = "^4.5.1"
django-redis = "^5.4.0"
gunicorn = "^22.0.0"
psycopg2-binary = "^2.9.9"
pytz = "^2024.1"
Expand Down

0 comments on commit 010aea4

Please sign in to comment.