Page MenuHomePhabricator

Add a feature to clean up all the cache and offline data
Closed, ResolvedPublic

Description

In T201879, we found some articles' offline data will not be removed if we delete the articles from reading lists.

Although we have a patch to solve that issue, the existing "junk" offline data will be still remaining in the app as user data.

To solve that, we can provide a feature (a button) with a warning message to clear all the cache data in cache -> okhttp-cache and files -> okhttp-cache

Event Timeline

Another idea we discussed is to create a periodic automated task that actually checks for orphan files in the cache directories. (i.e. query reading list pages from the database, and physically check the cache contents for each page)

Have an idea that does the following steps:

  1. Query all pages
  2. Check the valid caches and move the caches to a temp folder
  3. Clean up the cache folder
  4. Move the files inside temp folder back to the cache folder.

@Charlotte
After discussing with engineers, we think it would be better if we move this ticket to the N board since we are all not sure about what is the best way of implementing it.

Seems reasonable @cooltey - I will leave in the N backlog till you've identified a way forward.