Skip to content

Commit 0ca83b5

Browse files
committed
chore(passport): use django redis cache
1 parent ff8f9db commit 0ca83b5

2 files changed

Lines changed: 3 additions & 17 deletions

File tree

rootfs/api/settings/production.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -328,26 +328,11 @@
328328
DRYCC_VALKEY_ADDRS = os.environ.get('DRYCC_VALKEY_ADDRS', '127.0.0.1:6379').split(",")
329329
DRYCC_VALKEY_PASSWORD = os.environ.get('DRYCC_VALKEY_PASSWORD', '')
330330

331-
# Cache Configuration
332-
CACHES = {
333-
"default": {
334-
"BACKEND": "django_redis.cache.RedisCache",
335-
"LOCATION": ['redis://:{}@{}'.format(DRYCC_VALKEY_PASSWORD, DRYCC_VALKEY_ADDR) \
336-
for DRYCC_VALKEY_ADDR in DRYCC_VALKEY_ADDRS], # noqa
337-
"OPTIONS": {
338-
"CLIENT_CLASS": "django_redis.client.ShardClient",
339-
}
340-
}
341-
}
342-
343331
# Cache Valkey Configuration
344332
CACHES = {
345333
"default": {
346-
"BACKEND": "django_redis.cache.RedisCache",
334+
"BACKEND": "django.core.cache.backends.redis.RedisCache",
347335
"LOCATION": os.environ.get('DRYCC_VALKEY_URL', 'redis://:@127.0.0.1:6379'),
348-
"OPTIONS": {
349-
"CLIENT_CLASS": "django_redis.client.DefaultClient",
350-
}
351336
}
352337
}
353338

rootfs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ asgiref==3.8.1
1010
psycopg[binary]==3.2.6
1111
requests==2.32.3
1212
requests-toolbelt==1.0.0
13-
django_redis==5.4.0
13+
redis==6.2.0
14+
hiredis==3.2.1
1415
dj-database-url==2.3.0
1516
django-oauth-toolkit==3.0.1
1617
whitenoise==6.9.0

0 commit comments

Comments
 (0)