mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-10 13:23:40 -05:00
Before, the delete decorator would delete the keys from Redis and then we made the request to api to change the data. However, it is possible that the cache could get re-populated in between these two things happening, and so would cache outdated data. This changes the order to send the api request first. We then always delete the specified keys from Redis. Changing the order of the code in the decorator changes the order in which the cache keys get deleted, so the tests have been updated.