mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-28 11:49:42 -04:00
Added a redis cache for the template usage stats.
Cache expires every 10 minutes, but will help with the every 2 second query, especially when a job is running. There is some clean up and qa to do for this yet
This commit is contained in:
@@ -49,6 +49,7 @@ class Config(object):
|
||||
# URL of redis instance
|
||||
REDIS_URL = os.getenv('REDIS_URL')
|
||||
REDIS_ENABLED = os.getenv('REDIS_ENABLED') == '1'
|
||||
EXPIRE_CACHE_IN_SECONDS = 600
|
||||
|
||||
# Performance platform
|
||||
PERFORMANCE_PLATFORM_ENABLED = os.getenv('PERFORMANCE_PLATFORM_ENABLED') == '1'
|
||||
@@ -185,6 +186,7 @@ class Development(Config):
|
||||
Queue('research-mode', Exchange('default'), routing_key='research-mode')
|
||||
]
|
||||
API_HOST_NAME = "http://localhost:6011"
|
||||
REDIS_ENABLED = True
|
||||
|
||||
|
||||
class Test(Config):
|
||||
|
||||
Reference in New Issue
Block a user