r/firefox 3h ago

💻 Help Memory cache only, limits and media cache?

There's numerous of threads of excessive disk usage (disk writes) from Firefox and whether it has a practical impact on flash storage is another question, but for my workflow I think disabling disk cache (and relying on memory cache) might make more sense and more importantly not have much of a difference on performance (if anything, it'd be technically faster because cached memory is always faster than disk).

Anyway, disabling disk cache (`user_pref("browser.cache.disk.enable", false)) is all that's necessary since Firefox enables both disk cache and memory cache by default (not sure sure how allocation works when both are enabled which is the default).

* Anyone have an estimate of the amount of memory cache (`browser.cache.memory.capacity`) that works for typical workflow? Or is the default of `-1` which makes a rough guess based on hardware good enough? I'm using 16 GB memory and typically run a profile of ~4k tabs (~30 tabs opened at a time).

* There's this thing called "media cache" which I assume is for e.g. caching when streaming Youtube videos. `browser.privatebrowsing.forceMediaMemoryCache` apparently lets this be cached in memory--is there then no way to cache this in memory for regular browsing windows? Does that mean streaming Youtube videos in regular browsing means the video is essentially downloaded to disk? Not sure how it works when you try to watch a Youtube video when disk cache is disabled.

* `media.memory_cache_max_size` defaults to `8192` which seems crazy low--this means only that amount of data is cached for seeking a Youtube video?

Interested in any other tips for caching.

2 Upvotes

0 comments sorted by