Skip to content

Commit

Permalink
Update timeout for Redis caching
Browse files Browse the repository at this point in the history
The previous commit implemented caching, however seemingly the caching
expired.

Updates the global `CACHES` setting to include a `TIMEOUT` setting.

Contributes towards: #60
Eliminates requirement for: #41
  • Loading branch information
WayneLambert committed Aug 25, 2020
1 parent a176296 commit ddefca5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions aa_project/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def skip_static_requests(record):
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': os.environ['REDIS_URL'],
'TIMEOUT': None,
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
'PASSWORD': os.environ['REDIS_PASSWORD']
Expand Down
13 changes: 7 additions & 6 deletions aa_project/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@

# Django Redis Cache Settings
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": os.environ['REDIS_URL'],
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"PASSWORD": os.environ['REDIS_PASSWORD']
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': os.environ['REDIS_URL'],
'TIMEOUT': None,
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
'PASSWORD': os.environ['REDIS_PASSWORD']
},
}
}

0 comments on commit ddefca5

Please sign in to comment.