Skip to content

Create a separate store exclusively for media #5410

@poljar

Description

@poljar

We currently store both media and messages in the same SQLite database, which creates a couple of issues. The main problem is that we can’t remove downloaded media separately from cached messages—clearing the database affects both. While we could implement something that clears all tables, there’s also the challenge of having multiple concurrent writers. Since we record last accessed timestamps for the media cache, every media read results in a write, increasing the likelihood of write conflicts.

A cleaner solution would be to separate media and message storage into two distinct databases.

This would allow us to manage media caching independently from message storage, avoid unnecessary coupling, and reduce contention from concurrent database writes.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions