X
Tap here to go to the mobile version of the site.

Support Forum

Creating a custom cache location for multiple users

Posted

If I use the browser.cache.disk.parent_directory method (http://kb.mozillazine.org/Browser.cache.disk.parent_directory) to set up a specific folder for the cache:

Are there advantages to specifying a different (sub)folder for each of the users on my computer, or will Firefox handle things automatically just as well?

If I use the browser.cache.disk.parent_directory method (http://kb.mozillazine.org/Browser.cache.disk.parent_directory) to set up a specific folder for the cache: Are there advantages to specifying a different (sub)folder for each of the users on my computer, or will Firefox handle things automatically just as well?

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.0; rv:22.0) Gecko/20100101 Firefox/22.0

More Information

cor-el
  • Top 10 Contributor
  • Moderator
12510 solutions 115379 answers

Helpful Reply

Note that only one user can use a specific profile at the time, so if there is any chance that two or more users are active at the same time then you need separate profile folders and separate cache folders for each user.

Note that you can also set prefs via a mozilla.cfg auto configuration file.
Such a configuration file can contain JavaScript, so you can detect the user profile (ProfD) and environment variables.

See:

These functions can be used in the mozilla.cfg file:

defaultPref();  // set new default value
pref();         // set pref, but allow changes in current session
lockPref();     // lock pref, disallow changes
Note that only one user can use a specific profile at the time, so if there is any chance that two or more users are active at the same time then you need separate profile folders and separate cache folders for each user. Note that you can also set prefs via a mozilla.cfg auto configuration file.<br /> Such a configuration file can contain JavaScript, so you can detect the user profile (ProfD) and environment variables. See: *http://kb.mozillazine.org/Locking_preferences These functions can be used in the mozilla.cfg file: defaultPref(); // set new default value pref(); // set pref, but allow changes in current session lockPref(); // lock pref, disallow changes
Peter B. 0 solutions 11 answers

Hello Folks,

I have a very similar problem. I have an SSD running my OS & Fox upon, and I wanna save its lifetime via replacing the Firefox cache onto a ramdisk. I've set "browser.cache.disk.parent_directory" accordingly, but Fox even don't create the Cache folder there.

The about:cache says the cache is still at its default location, but there's only an index.sqlite at 10240 bytes, nothing else. I've deleted that, restarted Firefox, now it's 262144 bytes, but still no other files there. It seems the cache is unoperational now.

I use the suspend to RAM function extensively, so everything in memory are running for several weeks continuously. I restart the PC about once or twice a month. Is it a problem that when I restart, the ramdrive erases and the folder I set does not exist when I start Firefox ? Does it create that folder for itself, if it's not there upon restart ?

WinXP SP3, Firefox 20.0.1 See http://www.bluewings.hu/public/mozillla/963473/ for more specific configurations. (this forum disallows uploading configs)

Thanks for any help.

Cheers : Peter

Hello Folks, I have a very similar problem. I have an SSD running my OS & Fox upon, and I wanna save its lifetime via replacing the Firefox cache onto a ramdisk. I've set "browser.cache.disk.parent_directory" accordingly, but Fox even don't create the Cache folder there. The about:cache says the cache is still at its default location, but there's only an index.sqlite at 10240 bytes, nothing else. I've deleted that, restarted Firefox, now it's 262144 bytes, but still no other files there. It seems the cache is unoperational now. I use the suspend to RAM function extensively, so everything in memory are running for several weeks continuously. I restart the PC about once or twice a month. Is it a problem that when I restart, the ramdrive erases and the folder I set does not exist when I start Firefox ? Does it create that folder for itself, if it's not there upon restart ? WinXP SP3, Firefox 20.0.1 See http://www.bluewings.hu/public/mozillla/963473/ for more specific configurations. (this forum disallows uploading configs) Thanks for any help. Cheers : Peter

Modified by Peter B.

cor-el
  • Top 10 Contributor
  • Moderator
12510 solutions 115379 answers

Helpful Reply

You seem to be using"Clear history when Firefox closes" to clear the cache.
Do not clear the Cache because Firefox will disable the disk cache in such a case as you can see on the about:cache page (missing Disk Cache section).

Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.

Clearing cookies will remove all specified (selected) cookies including cookies with an allow exception.

You seem to be using"Clear history when Firefox closes" to clear the cache.<br /> Do not clear the Cache because Firefox will disable the disk cache in such a case as you can see on the about:cache page (missing Disk Cache section). *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings *https://support.mozilla.org/kb/Clear+Recent+History Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords. Clearing cookies will remove all specified (selected) cookies including cookies with an allow exception.
Peter B. 0 solutions 11 answers

THX !

The "Disk cache device" as about:cache says, is for storing content between restarts ? What's the difference between "Disk cache device" and "Offline cache device" ?

Is there any other means of limitin Firefox memory usage than disabling the memory cache ?

Thanks, Peter.

THX ! The "Disk cache device" as about:cache says, is for storing content between restarts ? What's the difference between "Disk cache device" and "Offline cache device" ? Is there any other means of limitin Firefox memory usage than disabling the memory cache ? Thanks, Peter.
cor-el
  • Top 10 Contributor
  • Moderator
12510 solutions 115379 answers

Disabling the memory cache is not recommended because Firefox needs to keep some data in memory and will probably still use about the same amount of memory in that case.

The Offline case is meant to be used by special applications and Firefox will always ask for confirmation when the offline cache needs to be used (Tools > Page Info > Permissions)

Does the disk cache get created in the specified location if you disable clearing the cache via "Clear history when Firefox closes"??

Disabling the memory cache is not recommended because Firefox needs to keep some data in memory and will probably still use about the same amount of memory in that case. The Offline case is meant to be used by special applications and Firefox will always ask for confirmation when the offline cache needs to be used (Tools > Page Info > Permissions) Does the disk cache get created in the specified location if you disable clearing the cache via "Clear history when Firefox closes"??
Peter B. 0 solutions 11 answers

[quote]Does the disk cache get created in the specified location if you disable clearing the cache via "Clear history when Firefox closes"?? [\quote]

YESSS !!! :-)))

Thanks a lot ! Let's give it a try ;-)

Cheers, Peter.

[quote]Does the disk cache get created in the specified location if you disable clearing the cache via "Clear history when Firefox closes"?? [\quote] YESSS !!! :-))) Thanks a lot ! Let's give it a try ;-) Cheers, Peter.

Modified by Peter B.

Peter B. 0 solutions 11 answers

Thanks cor-el, everything is OK with the caches now.

But, SSDlife still says that my SSD writes 1.5 times more data than it reads. I'm afraid it's not OK, the normal is when a disk reads way more than it writes, as long as I'm not doing video editing or such disk-intensive tasks daily, which is my case nowadays. First I assumed that Firefox cache is the reason, but as you found out it was disabled, then what else do the write cycles ? Windows swap file is also disabled. If I order the tasks in Task Manager descending to I/O written bytes, Firefox has highly the most written bytes ever. 69 megs Firefox, 4 megs the 2nd. Well, at least a short after startup.

Thank you a lot :

Peter.

Thanks cor-el, everything is OK with the caches now. But, SSDlife still says that my SSD writes 1.5 times more data than it reads. I'm afraid it's not OK, the normal is when a disk reads way more than it writes, as long as I'm not doing video editing or such disk-intensive tasks daily, which is my case nowadays. First I assumed that Firefox cache is the reason, but as you found out it was disabled, then what else do the write cycles ? Windows swap file is also disabled. If I order the tasks in Task Manager descending to I/O written bytes, Firefox has highly the most written bytes ever. 69 megs Firefox, 4 megs the 2nd. Well, at least a short after startup. Thank you a lot : Peter.

Modified by Peter B.

cor-el
  • Top 10 Contributor
  • Moderator
12510 solutions 115379 answers

You are only moving the cache, so all other files in the profile folder need to be accessed on the drive that stores this foler and that includes all SQLite database files

You are only moving the cache, so all other files in the profile folder need to be accessed on the drive that stores this foler and that includes all SQLite database files
Peter B. 0 solutions 11 answers

I see. But I wonder what the hell NEEDS to be written that much constantly, making 10 times more data than anything else. For example, what places.sqlite is for ? Can I disable that ?

Thanks, Peter.

I see. But I wonder what the hell NEEDS to be written that much constantly, making 10 times more data than anything else. For example, what places.sqlite is for ? Can I disable that ? Thanks, Peter.