Skip to content

Commit

Permalink
Used redis cache for default as well
Browse files Browse the repository at this point in the history
  • Loading branch information
bmispelon committed Jun 26, 2024
1 parent e9d4b7b commit c218bbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 4 additions & 5 deletions djangoproject/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@

CACHES = {
"default": {
"BACKEND": "django_pylibmc.memcached.PyLibMCCache",
"LOCATION": SECRETS.get("memcached_host", "127.0.0.1:11211"),
"BINARY": True,
"OPTIONS": {"tcp_nodelay": True, "ketama": True},
"BACKEND": "django.core.cache.backends.redis.RedisCache",
"LOCATION": SECRETS.get("cache_default_url", "redis://localhost:6379"),
},
# We use a separate cache for docs so we can purge it when docs are rebuilt
"docs-pages": {
"BACKEND": "django.core.cache.backends.redis.RedisCache",
"LOCATION": SECRETS.get("redis_host", "redis://localhost:6379/2"),
"LOCATION": SECRETS.get("cache_docs_url", "redis://localhost:6379/2"),
},
}

Expand Down
2 changes: 0 additions & 2 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
-r common.txt
django-pylibmc==0.6.1
pylibmc==1.6.1
redis==5.0.7
sentry-sdk==1.44.1

0 comments on commit c218bbe

Please sign in to comment.