mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
Increase provider lookup cache TTL to 10 seconds
Tested locally with TTL values of: - 2 seconds - 5 seconds - 10 seconds The benefit really started showing at 10 seconds, where >50% of lookups hit the cache rather than the database. For graphs see https://github.com/alphagov/notifications-api/pull/3075#issuecomment-750836404
This commit is contained in:
@@ -148,7 +148,7 @@ def update_notification_to_sending(notification, provider):
|
||||
dao_update_notification(notification)
|
||||
|
||||
|
||||
provider_cache = TTLCache(maxsize=8, ttl=2)
|
||||
provider_cache = TTLCache(maxsize=8, ttl=10)
|
||||
|
||||
|
||||
@cached(cache=provider_cache)
|
||||
|
||||
Reference in New Issue
Block a user