Page 1 of 1

Can I set my mozilla cache to clear automatically?

Posted: Thu 11 Feb 2010, 22:35
by SickPuppy
If you want to skip the fun story, just read the last line.

My free pupfile space continued to drop, and I increased it twice (128 megs each time). I was completely in the dark as to what could be eating it all up.

I knew that some caches were building up, so I've been using pfind to dig for those folders, although for about three days that was not solving my problem (my mistake was assuming that clearing seamonkey's cache in preferences was doing the job)

Tick-tock, the time bomb reached a count of 1M free (hello, pretty red warning signs!)

So at the very last minute I decided to take a direct look at mozillas cache folder, and found that despite my attempts in the programs preferences, nothing had even been touched.

Now that I know to keep an eye on /initrd/pup_ro2/root/.mozilla/default/Cache, it should never drop below 200M free.

Side q: just what are these pup_ro folders?

Is there any way I can set the mozilla caches to auto-clear at shutdown or boot-up?

Re: Can I set my mozilla cache to clear automatically?

Posted: Thu 11 Feb 2010, 22:57
by DMcCunney
SickPuppy wrote: Is there any way I can set the mozilla caches to auto-clear at shutdown or boot-up?
Which Mozilla product? SeaMonkey and Firefox both default to a 50MB disk cache, I believe. You can change that amount by going into about:config.

The browser.disk.cache.capacity preference controls the amount it uses. I set that to 20MB here, and make browser.cache.memory.enable False to disable memory cache.

And clearing the cache may not do what you want. I think Mozilla preallocates the space, so if you tell it a 50MB cache size, it will take 50MB of space, regardless of whether anything is actually stored in it. (Might be wrong about that bit, but don't have references handy.)

Mozilla here under Windows and Linux has obeyed the preferences I've specified, so the amount of cache used should not go above the allocated amount in preferences.

I'd look elsewhere for the culprit on your disappearing space in pupsave.
______
Dennis

Posted: Thu 11 Feb 2010, 23:41
by SickPuppy
Using Seamonkey, recently upgraded to Seamonkey 2.

And I have no need to look elsewhere, I gained 260M clearing that folder, so I absolutely, positively know that's what the problem was.

In the program preferences it has 19 Mb set for cache, and the folder in in a nearby area, but not the same folder that I cleared.

/root/.mozilla/seamonkey/

I don't even have firefox installed yet (although I did grab the pet yesterday.) and the data I was looking at was clearly images, animations, and settings from the sites I have been through in the past week)

If the seamonkey settings are at 19Mb, and seamonkey was the only browser used, and it clearly was browser data in that cache, then why did it grow to 260 megs?
DMcCunney wrote:
SickPuppy wrote: Is there any way I can set the mozilla caches to auto-clear at shutdown or boot-up?
Which Mozilla product? SeaMonkey and Firefox both default to a 50MB disk cache, I believe. You can change that amount by going into about:config.
Dennis
Is this a text file, or something I should do in the command prompt? (if that's a reference to a menu it'd be edit.preferences.advanced.cache here)

Posted: Fri 12 Feb 2010, 00:04
by DMcCunney
SickPuppy wrote:Using Seamonkey, recently upgraded to Seamonkey 2.

And I have no need to look elsewhere, I gained 260M clearing that folder, so I absolutely, positively know that's what the problem was.

In the program preferences it has 19 Mb set for cache, and the folder in in a nearby area, but not the same folder that I cleared.

/root/.mozilla/seamonkey/
Then something was borked in your SeaMonkey install.

SeaMonkey installs the program and libraries to /usr/lib/seamonkey, but keeps the cache in the profile folder. That's also where it stores bookmarks, extensions, themes and the like. this allows you to update the program without touching the user settings, and to have multiple users sharing the same copy of the program, because each has a separate profile folder.

You can use the Profile Manager to create/manipulate/remove profiles. Invoke SeaMonkey from a terminal window as "seamonkey -ProfileManager" to get to it. You can specify the name for a profile, and where you want the profile directory created. I make use of that on Windows, as I have multiple Mozilla products installed with multiple profiles. Everything lives under a \Mozilla hierarchy for ease of maintenance.

You can run SM with a specified profile by running it as "seamonkey -P <profile>". I do that with desktop icons and the appropriate command line specified in the icon properties.
I don't even have firefox installed yet (although I did grab the pet yesterday.) and the data I was looking at was clearly images, animations, and settings from the sites I have been through in the past week)

If the seamonkey settings are at 19Mb, and seamonkey was the only browser used, and it clearly was browser data in that cache, then why did it grow to 260 megs?
I have no idea, as it doesn't do that here, under Windows or Linux. Looks like a busted install, but I don't know how or why.
DMcCunney wrote:
SickPuppy wrote: Is there any way I can set the mozilla caches to auto-clear at shutdown or boot-up?
Which Mozilla product? SeaMonkey and Firefox both default to a 50MB disk cache, I believe. You can change that amount by going into about:config.
Is this a text file, or something I should do in the command prompt?
It's something you enter in the URL bar.

SM 1.X had it as an option of the Help menu choice, but SM 2.X doesn't seem to have it on a menu.

The actual preferences are stored in a file in the profile directory called prefs.js, but that's created and maintained by the browser, and should not be edited manually.
______
Dennis

Posted: Fri 12 Feb 2010, 00:14
by SickPuppy
So I can write commands into desktop icons? That could be equally efficient as anything automatically done.

What would I have to write into a desktop icon to get the entire contents of a folder ("/initrd/pup_ro2/root/.mozilla/default/Cache" in this case) selected and deleted with a click?

Something may have gotten a little glitched with this install, but storing a huge cache does seem to speed things along with frequently visited sites, so as long as I can clean up after every session, I don't see this being much of a problem anymore.

Posted: Fri 12 Feb 2010, 02:41
by Flash
In SeaMonkey, go to Edit -> Preferences -> Advanced -> Cache. There you can set the size of the cache, and tell SeaMonkey where to put it. If you put it in /tmp it should be cleared every time you reboot. At least, that's the way it works for me.

Posted: Sun 14 Feb 2010, 02:45
by DMcCunney
SickPuppy wrote:So I can write commands into desktop icons? That could be equally efficient as anything automatically done.

What would I have to write into a desktop icon to get the entire contents of a folder ("/initrd/pup_ro2/root/.mozilla/default/Cache" in this case) selected and deleted with a click?
You would write a script to do it, then associate the script with a desktop icon.

I was actually referring to Windows shortcuts in my comment, where right-clicking it and selecting Properties would let me edit the command associated with the shortcut. I use it to pass the Mozilla browser the name of profile I want it to use, since I have multiple profiles defined.

You can do the same under Linux. I run Xfce4 as my window manager, and I can create a Launcher on my desktop and associate a command with it.

I believe the same thing is possible with JWM, but I'm not in it now and can't test.
Something may have gotten a little glitched with this install, but storing a huge cache does seem to speed things along with frequently visited sites, so as long as I can clean up after every session, I don't see this being much of a problem anymore.
How huge a cache? The default is 50MB, I believe. I reduce that to 20.

If you have the RAM, you could increase the size of the cache SeaMonkey keeps in memory, which ought to provide faster performance. (I have 256MB on the Puppy machine, and turn memory caching off to conserve it, caching strictly to disk.)

See Flash's suggestion of specifying that the cache be created in /tmp, which should be removed when you reboot.
______
Dennis

Posted: Mon 15 Feb 2010, 17:20
by DMcCunney
DMcCunney wrote:See Flash's suggestion of specifying that the cache be created in /tmp, which should be removed when you reboot.
Another suggestion I've been playing with is on BruceB made in another thread on Firefox: use /dev/shm for the cache.

/dev/shm is virtual storage, maintained in RAM cache and on the swap partition by the kernel. No files are actually written to the hard drive. (See the Wikipedia article on tmpfs for details: http://en.wikipedia.org/wiki/Tmpfs)

Like putting cache in /tmp, the content goes away when you shutdown/reboot. Setting the browser.disk.cache.parent_directory preference in about:config to /dev/shm/cache will put Mozilla's browser disk cache there.

You can verify the existance by

Code: Select all

ls -lR /dev/shm
and manually clear it if you like when you exit the browser with

Code: Select all

/bin/rm -r /dev/shm/*
______
Dennis

Posted: Mon 15 Feb 2010, 17:53
by Béèm
Flash wrote:In SeaMonkey, go to Edit -> Preferences -> Advanced -> Cache. There you can set the size of the cache, and tell SeaMonkey where to put it. If you put it in /tmp it should be cleared every time you reboot. At least, that's the way it works for me.
Good point Flash. Thanks for reminding.

Posted: Mon 15 Feb 2010, 21:30
by murmelbahn
That topic is ringing a bell ...
Dramatically shrinking free space in pupsave

Proudog scoring highest with his post towards the end of page 1.

JR

Posted: Tue 16 Feb 2010, 04:17
by Flash
Béèm wrote:
Flash wrote:In SeaMonkey, go to Edit -> Preferences -> Advanced -> Cache. There you can set the size of the cache, and tell SeaMonkey where to put it. If you put it in /tmp it should be cleared every time you reboot. At least, that's the way it works for me.
Good point Flash. Thanks for reminding.
Well, it does keep SeaMonkey's cache from growing, but it doesn't actually create a cache in /tmp. At least I've never seen SeaMonkey's cache in there. :?