Open Bug 345070 Opened 19 years ago Updated 3 years ago

Move cache outside of the regular profile folder

Categories

(Toolkit :: Startup and Profile System, enhancement)

x86
Linux
enhancement

Tracking

()

People

(Reporter: yop, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060608 Ubuntu/dapper-security Firefox/1.5.0.4 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060608 Ubuntu/dapper-security Firefox/1.5.0.4 In the linux world, the firefox profile still have the webcache in the user profile. But in MS windows it have been moved to another location. Why not do the same for the linux version of Firefox? Something like "~.mozilla-cache/<user_profile_name>/Cache". This is better from a backup view, less to exclude. Reproducible: Always
Component: Startup and Profile System → XRE Startup
Product: Firefox → Toolkit
QA Contact: startup → xre.startup
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
stillsee this problem?
Whiteboard: closeme 2008-09-10
Valid enhancement request, not sure if we would do it though, it was done on windows because the main profile is in the location that is copied to and from the server whenever you log in.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Cache in different location than user profile → Move cache outside of the regular profile folder
Whiteboard: closeme 2008-09-10
Cache location should be configurable. Cache may be big, and is also useless to backup (using various backup schemes), two good reasons not to have it in /home/.
Cache location is configurable using preferences and a DirectoryServiceProvider. Since this is a toolkit bug, I assume you are not talking about a UI in Firefox.
Can you give details, please? I was talking generally about any types of cached data, not just the browser cache. Specifically, I was thinking of Thunderbird's ImapMail/ folder and global-messages.sqlite (gloda).
(The latter can and do reach GBs of size)
Just thought I'd provide a use case for this: User Joe has a Linux workstation This workstation is attached to a NIS domain The user's home directory is is stored centrally and accessed over NFS/SMB The user has a (small) quota on their home directory The user would like to store "important" things in the home directory, which is backed up, but cannot afford the quota usage or performance hit of storing big things in the home directory. The user would like to be able to store these other things locally on their workstation, in a configurable location.
Even normal users run into this, if they do backups. Including cache folders and gloda (1 GB sqlite file) will increase the incremental backup size 10-fold, for no gain. Sure, one could specifically exclude these files in the backup program, using its own means (UI, spec file, or rsync commandline parameters), but it's hard to exclude /home/username/.thunderbird/5sghe564dfj.default/globalmessages.sqlite, /home/username/.thunderbird/5sghe564dfj.default/ImapMail/, /home/username/.mozilla/firefox/hvtzps345.default/Cache/ and the same for all other profiles (I have dozens, and keep adding/removing them during dev) and users, so normal or even advanced users are unlikely to bother, and I think the problem shouldn't exist to start with, we need a better solution. Maybe it should be stored in .mozilla-cache/ by default as proposed above, there should be an nsIDirectoryService provider for it [1], and there should be UI to relocate such files. re Mark, all I could find was <http://mxr.mozilla.org/seamonkey/source/xpcom/io/nsAppDirectoryServiceDefs.h> #define NS_APP_CACHE_PARENT_DIR "cachePDir" Is this the <profile>/Cache/ dir, or its parent? If the latter, would it be reasonable to redefine it as above, that any non-primary data which can be regenerated, like xpti.dat, XUL.mfasl, browser Cache, gloda, ImapMail/, Songbird song scan database etc. should live there? Or should we define a new one?
FWIW, of course it would not be nice to lose the ImapMail/ or gloda et al, given that they may take a long time to regenerate. But they are also huge, and *can* be regenerated, so I'd rather exclude them from most backups. If I don't do anything, though, .mozilla-cache/ would be included in the backup. Downside of this proposal: It scatters data from the application over various folders. KDE already does this inside .kde/. It sometimes annoys me. Also compare the to Unix filesystem, which is organized by /etc config files, /usr/share/ architecture-independent app files etc. - this is both an nuisance and a good thing when admins put /etc/ under version control and I don't have much to search when looking for config files.
This bug is not just a back-up, but also a security issue. Use case (e.g. with a laptop): - All TB folders of an account are configured to be located on an encrypted drive (or e.g. a network drive) - The indexing file stays in the general application data directory and exposes confidential information. What's worst: The user assumes that the affected indexing file is also moved to the directory they specified for local folders, etc., and does not know that his data is not protected. So that they don't even think of disabling indexing to increase security (at costs of search speed, of course).
(In reply to comment #10) > This bug is not just a back-up, but also a security issue. Use case (e.g. > with a laptop): > - All TB folders of an account are configured to be located on an encrypted > drive (or e.g. a network drive) > - The indexing file stays in the general application data directory and > exposes confidential information. What's worst: The user assumes that the > affected indexing file is also moved to the directory they specified for > local folders, etc., and does not know that his data is not protected. So > that they don't even think of disabling indexing to increase security (at > costs of search speed, of course). Okay, the location of not only the indexing file, but the whole profile can be changed as described in http://kb.mozillazine.org/Moving_your_profile_folder. The issue is therefore resolved for me.
Quoting Henrik Zawischa on https://groups.google.com/group/mozilla.dev.apps.thunderbird/tree/browse_frm/month/2011-02/c3ba246be0e7c4e1?rnum=61&_done=%2Fgroup%2Fmozilla.dev.apps.thunderbird%2Fbrowse_frm%2Fmonth%2F2011-02%3F > In a Windows network with roaming user profiles it would be desirable to seperate > configuration data and content related files. It is no problem to redirect the mail- and > imapmail-folders to a different location, eg. the "Local Settings" or "AppData\Local" part of > the Windows user profile. But the global-messages-db.sqlite still sits with the roaming data, > cannot be moved. I have seen files with about 0.5 GB. Way to big for a roaming Windows > profile. I agree with this point: moving the global-messages-db.sqlite file out of the regular Windows profile folder would ease use/maintainance of roaming profiles (and help my every day's work). Thank you Andrea
I forgot to add: if it were configurable via the UI it would be great but also via the Config Editor it would be good for me. Thanks Andrea
In FF/Linux the problem goes even worse: if I replace $PROFILE/Cache dir with a synlink, FF removes it and regenerates the Cache dir on every startup. Plz DO SOMETHING!
Under Linux, we now have ~/.cache/<app>/ . We should use this by default. > if I replace $PROFILE/Cache dir with a sy[m]link, FF removes it and regenerates > the Cache dir on every startup. wow, that's bad - an app should never do that with symlinks - , but a different bug.
Current FF 21 seems to use ~/.cache/mozilla/firefox/xxx/Cache on Linux. THAT'S FINE ! But TB 17 still uses ~/.thunderbird/xxx/Cache :-( Also startupCache, OfflineCache, safebrowsing, thumbnails should be moved to ~/.cache/... for both, FF and TB.
(In reply to Ulf Zibis from comment #17) > ... > Also startupCache, OfflineCache, safebrowsing, thumbnails should be moved to > ~/.cache/... for both, FF and TB. see also here : https://bugzilla.mozilla.org/show_bug.cgi?id=868843
(In reply to Ulf Zibis from comment #17) > Current FF 21 seems to use ~/.cache/mozilla/firefox/xxx/Cache on Linux. > THAT'S FINE ! > But TB 17 still uses ~/.thunderbird/xxx/Cache :-( Tb17 yes, but on trunk it's ~/.cache/thunderbird/xxxxxxxx/Cache/
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.