Skip to content

Commit

Permalink
Update cache settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mmd-mostafaee committed Oct 27, 2024
1 parent af9c39b commit aa0f475
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions brightIDfaucet/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,24 @@ def before_send(event, hint):
# }
# }

if MEMCACHED_URL and ',' in MEMCACHED_URL:
CACHES = {
"default": {
"BACKEND": "django_bmemcached.memcached.BMemcached",
"LOCATION": MEMCACHED_URL.split(","),
"OPTIONS": {
"username": MEMCACHED_USERNAME,
"password": MEMCACHED_PASSWORD,
},
}
}
else:
CACHES = {
"default": {
"BACKEND": "django_bmemcached.memcached.BMemcached",
"LOCATION": MEMCACHED_URL
}
# if MEMCACHED_URL and ',' in MEMCACHED_URL:
CACHES = {
"default": {
"BACKEND": "django_bmemcached.memcached.BMemcached",
"LOCATION": MEMCACHED_URL.split(","),
"OPTIONS": {
"username": MEMCACHED_USERNAME,
"password": MEMCACHED_PASSWORD,
},
}
}
# else:
# CACHES = {
# "default": {
# "BACKEND": "django_bmemcached.memcached.BMemcached",
# "LOCATION": MEMCACHED_URL
# }
# }

# Password validation
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
Expand Down

0 comments on commit aa0f475

Please sign in to comment.