Closed
Bug 78480
Opened 24 years ago
Closed 23 years ago
Can't seem to set the cache directory as of 30042001 build
Categories
(Core :: Networking: Cache, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla0.9.5
People
(Reporter: conceptrat+mozilla, Assigned: gordon)
References
Details
(Whiteboard: PDT+ [verified on branch])
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
gagan
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
As of the 30042001 build the cache directory doesn't seem to be able to be set
via the prefs.js entry:
user_pref("browser.cache.directory", "");
It seems to just default to the NewCache directory in the profile directory.
Is this to be a feature. Would rather be able to specify where the cache
resides. Like say the temp directory.
Comment 1•24 years ago
|
||
over to cache
Assignee: dveditz → gordon
Component: Preferences: Backend → Networking: Cache
QA Contact: sairuh → tever
Found the reason. I don't know if this is how it's supposed to work, but ...
If you don't set user_pref("browser.enable.cache", true); then the browser uses
the directory "NewCache" under the profile your using. If you set
user_pref("browser.enable.cache", true); then the cache goes into the directory
specified in user_pref("browser.cache.directory", ""); and in my case I must
specify "\" as "\\".
Oooops sorry just realised that the user_pref("browser.cache.directory", "");
is for the older cache system. For the new cache system I mean't to say
user_pref("browser.newcache.directory", "");
This all seems very confusing. I'll try and straighten this up for 0.9.1.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → mozilla0.9.1
One of the things we need to clean up is to stop using "NewCache" as a directory
name, and go back to "Cache".
When that's going to happen could you make sure to check the database in the
cache directory just in case someone is using the older caching/mozilla version.
If so just delete the cache directory contents and start again. I think this
sounds right. Trying to help.
Comment 8•24 years ago
|
||
moving to 0.9.2 per PDT triage
Target Milestone: mozilla0.9.1 → mozilla0.9.2
I know this isn't big deal for most who understand what's going on, but I can't
imagine that too much of a problem to fix it.
It's a real pain if by default the new cache goes to NewCache in your profile
directory and that the Preferences doesn't correctly add the option:
user_pref("browser.newcache.directory", "...");
and instead adds
user_pref("browser.cache.directory", "...");
to set the directory that your cache goes to.
Could this be any simpler?
Anyway fix for now for new builds for the moment is the following:
In your prefs.js file look for:
browser.cache.enable
Should be:
user_pref("browser.enable.cache", true);
Now in your prefs.js file look for, but don't expect to find it:
browser.newcache.directory
Should be:
user_pref("browser.newcache.directory", "...");
If it's not in there, put it in and replace the ... with the directory that you
want the cache files to go in.
Example, from my computer for build 2001053104:
user_pref("browser.newcache.directory",
"d:\\temp\\Mozilla\\Julz\\heial9p5.slt\\Cache");
Assignee | ||
Comment 10•23 years ago
|
||
I think the bug is that we're still using browser.newcache.directory.
Reporter | ||
Comment 11•23 years ago
|
||
Yup definitely. Although I'm not sure if this gets fixed, to use the
"browser.cache.directory" prefs.js setting, what happens if the new builds of
the browser find the old cache database and files in the directory set in
"browser.cache.directory". Hopefully this will just be a matter of check cache
file type if it's old style then delete files in this directory and start
creating new cache files.
Assignee | ||
Comment 12•23 years ago
|
||
*** Bug 85348 has been marked as a duplicate of this bug. ***
Comment 13•23 years ago
|
||
Is this related to bug 46490 ?
Assignee | ||
Comment 14•23 years ago
|
||
Only sort of. That bug is related to the UI, this bug is for the cache service
to read the preference properly.
Comment 15•23 years ago
|
||
Lets try these on the trunk and if they do well there we can try bringing them
back in the 0.9.2 branch.
Keywords: nsBranch
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Comment 16•23 years ago
|
||
*** Bug 87978 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
Target Milestone: mozilla0.9.3 → mozilla1.0
Comment 17•23 years ago
|
||
*** Bug 89664 has been marked as a duplicate of this bug. ***
Comment 18•23 years ago
|
||
Things have gotten broken in the last few weeks, now even
browser.newcache.directory is being ignored and the default cache directory is
being used in the profile directory. win32 2001071004 build
Comment 19•23 years ago
|
||
fyi:
user_pref("browser.cache.directory", "D:\\cache\\Mozilla\\");
...
user_pref("browser.newcache.directory", "D:\\cache\\Mozilla\\");
Comment 20•23 years ago
|
||
I also see this problem. Even after following the steps earlier in the bug, I
cannot make the cache go anywhere but myprofiledir/Cache/ (nightly 2001071704,
win32)
Reporter | ||
Comment 21•23 years ago
|
||
Okay "browser.newcache.directory" is working again under Win32 Build 2001072403,
see my comments further up. I'm just getting the latest trunk win32 to see if
that's working again.
By the way Build 2001072403 seems quite stable, hopefully the latest trunk will
be too.
Comment 22•23 years ago
|
||
nope 2001072808 still defaults to profile directory.
Assignee | ||
Comment 23•23 years ago
|
||
The trunk is no longer using browser.newcache.directory, but rather
"browser.cache.disk.directory". This preference indicates the parent directory
that the cache directory will be create in. We no longer create a directory
named "NewCache", but just simply "Cache".
Comment 24•23 years ago
|
||
Are we going for a prefs.js cache entry record for complete obfuscation?
user_pref("browser.cache.directory", "D:\\cache\\Mozilla\\");
user_pref("browser.cache.disk.directory", "D:\\cache\\Mozilla\\");
user_pref("browser.newcache.directory", "D:\\cache\\Mozilla\\");
Comment 25•23 years ago
|
||
OK, the new pref works, but it now creates a "Cache" directory under the
specified path. If the pref specifies a path, why add another dir level?
Assignee | ||
Comment 26•23 years ago
|
||
Excellent questions.
We are adding a new preference and new level for the cache directory to avoid
drastic consequences of the simple misunderstanding between "where I want my
cache directory to go" and "what I want my cache directory to be".
Someday we would like to reintroduce UI for setting the location of the cache
directory, and then even more users will be subject to this confusion (not just
those that are comfortable editing their prefs.js files).
By interpreting the preference as the parent of the cache directory, the
consequences of misunderstanding are relatively minor: if the user mistakenly
thinks the pref represents the path of the cache directory, the result is a
cache directory is created one level deeper than expected.
However, interpreting the preference as the path of the cache directory rather
than the parent has much more severe results: if the user mistakenly thinks the
pref represents the parent directory of the cache "I want the cache in my home
directory/system folder/etc.", the disk cache will spew cache files into that
directory, and may even attempt to delete non-cache files as well (clear cache).
That's why it is important to migrate to a new preference and a new interpretation.
Comment 27•23 years ago
|
||
perhaps "browser.cache.disk.parent_directory" would be a less confusing name?
Assignee | ||
Comment 28•23 years ago
|
||
Yup. I'd be hip to that.
Comment 29•23 years ago
|
||
Can someone please summarize the situation? What is the current prefs.js syntax
to set the cache location, and does it work on any or all platforms?
Comment 30•23 years ago
|
||
In order for the cache to be in a nonstandard place you need to add the
following two lines to your prefs.js file (WinME):
user_pref("browser.enable.cache", true);
user_pref("browser.cache.disk.directory", "C:\\temp\\mozillacache");
Adjust the path to your needs. Mozilla will create a subdirectory named "Cache"
below the directory you specify.
Methinks I had the problem of being unable to set the cache directory under
Linux. I have no access to a Linux box capable of running mozilla right now. Can
somebody comment on this?
Comment 31•23 years ago
|
||
Thanks for the update. This doesn't seem to work on Mac OS X. I tried
user_pref("browser.enable.cache", true);
user_pref("browser.cache.disk.directory", "HD Name:pathtofolder");
Also tried UNIX-style
user_pref("browser.enable.cache", true);
user_pref("browser.cache.disk.directory", "/pathtofolder");
Both times the browser continued to use the Cache folder in my profile folder
Comment 32•23 years ago
|
||
Gordon/Gagan - This is marked TM1.0. Suggest we nsbranch- it for this round.
Assignee | ||
Comment 34•23 years ago
|
||
Comment 35•23 years ago
|
||
sr=darin
Assignee | ||
Comment 36•23 years ago
|
||
Comment 37•23 years ago
|
||
Comment on attachment 49803 [details] [diff] [review]
Darin's original suggestion used an underscore rather than mixed case. I like that better.
sr=darin
Attachment #49803 -
Flags: superreview+
Comment 38•23 years ago
|
||
Comment on attachment 49803 [details] [diff] [review]
Darin's original suggestion used an underscore rather than mixed case. I like that better.
seems clearer to me to say parent_directory. r=gagan
Attachment #49803 -
Flags: review+
Assignee | ||
Comment 40•23 years ago
|
||
Change checked into trunk and branch.
Mozilla on the Macintosh does not allow you to enter text in preference files to
specify file/directory locations. nsIFile objects are stored as aliases on the
Mac, so any code that reads in file location preferences would simply get
confused by a simple pathname. To enable the feature of specifying the cache
directory on the Mac, we need to have UI - which is covered by another bug (bug
46490).
I'm marking this bug fixed.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 41•23 years ago
|
||
verified on branch -
these work:
user_pref("browser.cache.disk.enable", true);
user_pref("browser.cache.disk.capacity", 40000);
user_pref("browser.cache.disk.parent_directory", "d:\\tempcache\\");
similar for unix except slashes reversed.
Win NT4 2001-09-24-05-0.9.4
Linux rh6 2001-09-24-04-0.9.4
Keywords: vtrunk
Whiteboard: PDT+ → PDT+ [verified on branch]
Comment 42•23 years ago
|
||
VERIFIED on Linux
However, the pref
user_pref("browser.cache.disk.enable", true);
is no longer necessary. Specifying
user_pref("browser.cache.disk.capacity", 40000);
user_pref("browser.cache.disk.parent_directory", "/tmp/mozcache");
is sufficient.
BTW, I have posted a patch for bug 46490 to add the UI for this feature into the
prefs panel. Go check it out and give it a review!
Comment 43•23 years ago
|
||
verified on Win98, therefore marking VERIFIED.
I used the prefs
user_pref("browser.cache.disk.capacity", 40000);
user_pref("browser.cache.disk.parent_directory", "d:\\tempcache\\");
the following is no longer necessary
user_pref("browser.cache.disk.enable", true);
Can someone try to verify this on a Mac? That would be very helpful for me since
I am trying to come up with a GUI for this in bug 46490. I have it working on
Linux and Windows, Mac is more difficult, especially since I do not have one to
test this on. Does this work at all on a Mac?
Status: RESOLVED → VERIFIED
Comment 44•23 years ago
|
||
*** Bug 106099 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•