mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Cache returned letter summary in Redis
We’re going to start using the returned letters summary to show some info on the dashboard. This means we will be accessing it more often than it changes. And we know exactly when it changes because it’s us manually submitting the references we get from DVLA. This makes it a good candidate for being cached, and Redis is where we cache stuff that we’d otherwise go to the API for.
This commit is contained in:
@@ -360,6 +360,9 @@ def platform_admin_returned_letters():
|
||||
|
||||
try:
|
||||
letter_jobs_client.submit_returned_letters(references)
|
||||
redis_client.delete_cache_keys_by_pattern(
|
||||
'service-????????-????-????-????-????????????-returned-letters-summary'
|
||||
)
|
||||
except HTTPError as error:
|
||||
if error.status_code == 400:
|
||||
error_references = [
|
||||
|
||||
Reference in New Issue
Block a user