Skip to content

Commit 5c038b8

Browse files
authored
Fixed #1023 -- Used django's redis cache backend
1 parent 3a0dccc commit 5c038b8

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

djangoproject/settings/prod.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,13 @@
1414

1515
CACHES = {
1616
"default": {
17-
"BACKEND": "django_pylibmc.memcached.PyLibMCCache",
18-
"LOCATION": SECRETS.get("memcached_host", "127.0.0.1:11211"),
19-
"BINARY": True,
20-
"OPTIONS": {"tcp_nodelay": True, "ketama": True},
17+
"BACKEND": "django.core.cache.backends.redis.RedisCache",
18+
"LOCATION": SECRETS.get("cache_default_url", "redis://localhost:6379"),
2119
},
20+
# We use a separate cache for docs so we can purge it when docs are rebuilt
2221
"docs-pages": {
23-
"BACKEND": "redis_cache.RedisCache",
24-
"LOCATION": SECRETS.get("redis_host", "localhost:6379"),
25-
"OPTIONS": {
26-
"DB": 2,
27-
},
22+
"BACKEND": "django.core.cache.backends.redis.RedisCache",
23+
"LOCATION": SECRETS.get("cache_docs_url", "redis://localhost:6379/2"),
2824
},
2925
}
3026

requirements/prod.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
-r common.txt
2-
django-pylibmc==0.6.1
3-
django-redis-cache==3.0.1
4-
pylibmc==1.6.3
52
redis==5.0.8
63
sentry-sdk==2.11.0

0 commit comments

Comments
 (0)