App cache grows unbounded, with no way to flush it.
Steps to reproduce
- Observe EX is using gigabytes of disk space
- Feel frustrated that there is no way to fix it short of logout+login or reinstalling the app.
Outcome
What did you expect?
The app could tune its cache size, a bit like a browser does, to some sensible maximum value.
Even better, we could expose a "clear cache" button, just like WA and Signal etc do, to let the user prune storage. N.B. this would not be as a workaround to bugs, but simply to reclaim storage space.
What happened instead?
No way to reclaim disk space, ever.
Your phone model
No response
Operating system version
No response
Application version
638
Homeserver
No response
Will you send logs?
No
As it happens, iOS will spontaneously blow away Caches/ at any point to reclaim disk space. To quote @pixlwave:
Note that the system may delete the Caches/ directory to free up disk space, so your app must be able to re-create or download these files as needed. from https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html
On one hand, it feels nice for the OS to be able to apply backpressure to apps to reclaim diskspace.
On the other hand, if as a user you are depending on Element for offline or partial-offline usage, it could be super annoying to discover that all your cache inexplicably vanished and you are unable to use the app offline.
So, i'd suggest:
- We move caches out of Caches/ to somewhere else, so the OS doesn't spontanously vape them
- We give the user manual controls for the size of the cache and to explicitly flush it if they need to reclaim disk space, much like Telegram does:
.. and please don't have 5GB as minimum setting. I'd be fine with 1GB or even less (+ manual purge, as mentioned by Matthew).
Looking into the app container on macOS it seems like the majority of the data is actually various downloaded attachments in "tmp" at the root of the container. There are also log files in there for some reason. Is that a directory the OS automatically clears?... It should probably use the Foundation-provided Caches and Logs dirs to store these files regardless.
Either way I would at the very least expect the "Clear caches" button in the app to clear all this, since manually deleting this folder isn't an option on iOS.