A
A
akimdi2018-07-12 21:55:18
ubuntu
akimdi, 2018-07-12 21:55:18

How to put Firefox cache and profile in RAM?

I googled for a long time and tried different instructions for placing the cache and profile on the RAM disk. As a result, I installed profile-sync-daemon , but it only synchronizes the profile between RAM and the hard drive, but not the cache. Then I decided to disable the cache altogether. Changed the following settings in about:config:

network.http.use-cache = false
browser.cache.offline.enable = false
browser.cache.disk.enable = false
browser.cache.disk.smart_size.enabled = false
browser.cache.disk_cache_ssl = false
browser.cache.memory.enable = false

but that didn't help and Firefox still created the ~/.cache/mozilla/ folder with temporary files.
Then I decided to try to create a separate RAM disk and move the cache there.
mkdir ~/RAM-drive-tmpfs
And added the following line to the end of the /etc/fstab file:
tmpfs   ~/RAM-drive-tmpfs   tmpfs    rw     0     0

Everything is successful and the folder works, but the cache is now partly in ~/RAM-drive-tmpfs and partly in ~/.cache/mozilla/ I
also tried the browser.cache.disk.parent_directory parameter in about:config
but nothing happened.
Ubuntu 18.04 LTS system (Bionic Beaver).
Ask for help from Firefox experts.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#, 2018-07-12
@akimdi

sorry... I didn't quite get it - were you able to mount typical profile paths on a RAM disk?
if yes, then in profiles.ini (for any system) it is worth correcting:

[Profile0]
....
IsRelative=0

then the profile contains a cache in the general dump of folders
ps if specifically Linux - I can rummage through the archives and look for a script / template for profiles (there also ended up with a cache with the general folder of the profile)
pps profiles.ini/IsRelative=0 requires the full specification of the path to the profile , this is important
ppps Well, this is another question - only to make caches in RAM? Or the whole profile?
if you have an SSD, perhaps this article will be interesting - https://habr.com/post/397865/
well, instead of a complicated fix by hand, you can do this
put in the user.js file in the profile (that is, easily replicated)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question