Force Firefox to use RAM as cache only

Discussion of features in Mozilla Firefox
Locked
LL231
Posts: 6
Joined: August 22nd, 2007, 5:39 pm

Force Firefox to use RAM as cache only

Post by LL231 »

I have 2.5GB of RAM on my system. I would like to know if it is possible to allocate say 512MB of RAM exclusively for Firefox's cache. Firefox would not use the HDD for caching at all. I understand that even if you set disk cache to zero in FF it will still use the disk cache to some extent.

I don't want to configure a separate Ramdisk. I have found apps to configure Ramdisks on Windows XP to be troublesome or lacking. I'm looking for a plug-and-play system here. Is this possible, or is it something the FF team might consider for a future version.

This way I wouldn't have to worry about hard drive space being eaten up.
User avatar
steviex
Moderator
Posts: 28902
Joined: August 12th, 2006, 8:27 am
Location: Middle England

Re: Force Firefox to use RAM as cache only

Post by steviex »

Type about:config into the Location Bar

Set these preferences to these values....

browser.cache.disk.enable to False
browser.cache.memory.enable to True
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -Albert Einstein

Please DO NOT PM me for support... Lets keep it on the board, so we can all learn.
LL231
Posts: 6
Joined: August 22nd, 2007, 5:39 pm

Re: Force Firefox to use RAM as cache only

Post by LL231 »

Does the options dialog not do that anyway?

I was wondering about pre-allocating say 512MB of RAM for the cache.
User avatar
Bluefang
Posts: 7857
Joined: August 10th, 2005, 2:55 pm
Location: Vermont
Contact:

Re: Force Firefox to use RAM as cache only

Post by Bluefang »

I was wondering about pre-allocating say 512MB of RAM for the cache.

Memory is allocated as needed. If you want to have the equivalent of disk cache in RAM then you'll need to use a RAMDisk.
There have always been ghosts in the machine... random segments of code that have grouped together to form unexpected protocols. Unanticipated, these free radicals engender questions of free will, creativity, and even the nature of what we might call the soul...
Alan Baxter
Posts: 4419
Joined: May 30th, 2005, 2:01 pm
Location: Colorado, USA

Re: Force Firefox to use RAM as cache only

Post by Alan Baxter »

Setting the browser.cache.memory.capacity pref to 512000 might help.
http://kb.mozillazine.org/Browser.cache.memory.capacity
You might have to create it in about:config with right-click > New > Integer
Locked