Use a in memory cache instead of file storage
@marcbaechinger is already working on this.
Since Jul 14, 2025.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
[REQUIRED] Use case description
I often use caching of manifests and segments for content, now there is a single Cache implementation -> SimpleCache, which works with file storage, and there is a need to solve the following problems:
- I want to write less to disk so as not to consume device resources;
- On some TV devices, read/write operations take a long time;
- Users have errors related to reading/writing to the file system (they cannot create a directory or file; there is not enough space on the device).
Therefore, there is a desire to try using temporary RAM instead of the file system for sometimes, and of couse it's will work only for an active sessions. Also, this type of cache will most likely need to be used with lower maximum MB storage values.
Proposed solution
Maybe, create a implementation of the androidx.media3.datasource.cache.Cache interface that will work with RAM instead of the file system, named InMemoryCache for example.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.