From ae93de2a5f9cd1181d5652ea50b35aa792ca94dd Mon Sep 17 00:00:00 2001 From: Dat PHAM HOANG Date: Wed, 27 Apr 2022 11:58:11 +0700 Subject: [PATCH] [ADR] Cleaning up cache strategy --- docs/adr/0005-cleaning-up-cache-strategy.md | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/adr/0005-cleaning-up-cache-strategy.md diff --git a/docs/adr/0005-cleaning-up-cache-strategy.md b/docs/adr/0005-cleaning-up-cache-strategy.md new file mode 100644 index 000000000..14ba7e394 --- /dev/null +++ b/docs/adr/0005-cleaning-up-cache-strategy.md @@ -0,0 +1,22 @@ +# 5. Cleaning up cache strategy + +Date: 2022-04-27 + +## Status + +Accepted + +## Context + +- Cleaning up the emails in cache which email have `receivedAt` was over 30 days from today +- Cleaning up was triggered when user START the app on the first time of each day + +## Decision + +- Cleaning up the emails in cache which email have `receivedAt` was over 10 days from today +- Cleaning up was triggered when every time user START the app + +## Consequences + +- Cache is clean up more usually +- Reduce the device's storage for the cache, may useful for user who have too many mails