55 Commits

Author SHA1 Message Date
db48x%yahoo.com
5b16d9a80a bug 272277: Change to Append/Assign/Equals-Literal in networking
patch by Mikael Parknert <mikael@parknert.se>, r=cbiesinger, sr=darin


git-svn-id: svn://10.0.0.236/trunk@166238 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-04 10:19:29 +00:00
darin%meer.net
39af61b774 Landing initial version of SQL-based disk cache (NOT PART OF THE BUILD)
git-svn-id: svn://10.0.0.236/trunk@164080 18797224-902f-48f8-a5cc-f745e15eee43
2004-10-20 05:00:23 +00:00
gerv%gerv.net
586f796c2a Bug 236613: change to MPL/LGPL/GPL tri-license.
git-svn-id: svn://10.0.0.236/trunk@155091 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-18 22:01:16 +00:00
timeless%mozdev.org
27cf91f081 Bug 229476 about:cache title capitalization inconsistent
patch by jmd@pobox.com r=bz sr=darin


git-svn-id: svn://10.0.0.236/trunk@151169 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-11 08:11:53 +00:00
technutz%netscape.net
388605f4b6 Bug 106618. Change KB to KiB across the application. Patch by Alexey Chernyak <alexey@optus.net>. r=bz, sr=darin
git-svn-id: svn://10.0.0.236/trunk@150738 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-26 07:11:58 +00:00
bryner%brianryner.com
4995514c49 Updating my email address
git-svn-id: svn://10.0.0.236/trunk@147418 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-29 06:04:02 +00:00
bryner%brianryner.com
109d623425 Fix build on gcc 3.4 by removing extra semicolons (bug 218551). r/sr=dbaron, a=brendan.
git-svn-id: svn://10.0.0.236/trunk@146624 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-07 23:12:15 +00:00
gordon%netscape.com
0bd0d75242 Fix bug 204398, fixing alignment of about:cache.
patch=abecevello@sympatico.ca, r=gordon, sr=darin, a=asa


git-svn-id: svn://10.0.0.236/trunk@142389 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-13 23:15:20 +00:00
gordon%netscape.com
e07a0ba8a9 Fix bug 105344 "Memory cache should be based on amount of physical RAM"
This allows the cache to use a lot more memory than previously.
r=saari, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@141677 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-23 05:15:48 +00:00
gordon%netscape.com
f1e46c61a4 Fix bug 198267. Fix accounting of mInactiveSize to prevent assertion. rs=darin.
git-svn-id: svn://10.0.0.236/trunk@140337 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-26 05:14:27 +00:00
gordon%netscape.com
bedef0cf7a Fix bug 198267 and bug 191161. r=bryner, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@140224 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-25 07:05:33 +00:00
bryner%netscape.com
5655e17c35 trying to fix nebiros bustage - moving inline function before its first call site
git-svn-id: svn://10.0.0.236/trunk@139652 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-18 06:02:10 +00:00
bryner%netscape.com
46e842db3d Implement an LRU-SP eviction policy for the memory cache (bug 188458). r=gordon, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@139625 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-17 23:22:29 +00:00
darin%netscape.com
2b1d90b6ed modifications for bug 176919 "async streams" r=dougt,gordon sr=sspitzer a=valeski,asa
git-svn-id: svn://10.0.0.236/trunk@136572 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-18 02:15:14 +00:00
darin%netscape.com
7f9fc38dbd landing gordon's patch for bug 81724 - disk cache needs stream wrappers
(disk cache phase 3) patch=gordon r=dougt sr=darin


git-svn-id: svn://10.0.0.236/trunk@126569 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-07 01:13:29 +00:00
dougt%netscape.com
d6cc711878 Fixes mozilla/strings requiring unfrozen nsCRT class. patch by scc, r=dougt, sr=jag, b=136756
git-svn-id: svn://10.0.0.236/trunk@121534 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 18:55:21 +00:00
gordon%netscape.com
8dcbf5b04d fix for bug 91795 "large downloads cause mozilla to consume too much memory".
Changed OnDataSizeChange() to abort when entry size exceeds cache capacity.
r=dougt, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@121316 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 23:44:53 +00:00
cathleen%netscape.com
6f09324ed7 eliminate nsCRT::strlen for char* strings (part 4), bug 124536 r=dp sr=brendan
git-svn-id: svn://10.0.0.236/trunk@114939 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-19 16:01:45 +00:00
gordon%netscape.com
b983639064 fix bug 120833 "default value of nsICacheEntryInfo::expirationTime should be PRUint32(-1)". r=gagan, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@112640 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:06:28 +00:00
bzbarsky%mit.edu
d0c7beb38b Use <> for system headers, not "". This should help prevent Sun WSU2
compiler bustage.  Bug 111574, patch from Roland Mainz
(<Roland.Mainz@informatik.med.uni-giessen.de>), r=bzbarsky, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@108847 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-23 22:36:54 +00:00
gordon%netscape.com
8609b55dfc For bugscape bug 6985. Enabling cache support for dynamically switching profiles. r=ccarlen, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@101242 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 00:01:01 +00:00
bbaetz%cs.mcgill.ca
8ba48c051d This fixes two small problems that may cause pages being partially loaded. 82720. The first problem addresses new cache entries being created when access to the entry is readonly. The second fix was to a badly placed assertion.
Patch by gordon, r=bbaetz, sr=dougt.


git-svn-id: svn://10.0.0.236/trunk@99543 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-18 23:37:17 +00:00
dbaron%fas.harvard.edu
9359000a40 Header include dependency cleanup. b=64023 r=jag rs=brendan
git-svn-id: svn://10.0.0.236/trunk@99299 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-16 02:40:48 +00:00
darin%netscape.com
59d5a4317d Fixes bug 85054 "Hard Drive grinds when disk cache set to zero."
patch=gordon, r=gagan, sr=darin


git-svn-id: svn://10.0.0.236/trunk@98119 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-28 01:30:26 +00:00
gordon%netscape.com
14fe63ff10 fix for bug 75183, "separate eviction policy for chrome needed". sr=darin.
git-svn-id: svn://10.0.0.236/trunk@94167 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 00:04:50 +00:00
gordon%netscape.com
a3fc07f496 Fix for bug 76661, "Recursive attempt to lock cache entry". r=dougt, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@93760 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 02:35:26 +00:00
gordon%netscape.com
6c231a906a Fix bug 73441 "New cache needs "Clear" functionality. Changed pref advanced cache panel clear buttons to clear new cache devices, and fixed bug in nsMemoryCacheDevice to avoid calling nsCRT::strlen(nsnull). sr=darin.
git-svn-id: svn://10.0.0.236/trunk@91741 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 09:52:15 +00:00
gordon%netscape.com
1e0c0b4023 Landing DISKCACHE1_BRANCH (part Deux) which enables dynamic eviction and efficient cache miss detection for the disk cache (bug 72506) r=beard, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@91234 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-04 03:30:45 +00:00
gordon%netscape.com
473ba08356 Land DISKCACHE1_BRANCH, implementing first draft of cache map file for more efficient eviction and cache miss detection. Fixed some problems with overeager setting of lastModified time stamp. Read cache enable prefs on startup. r=beard, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@90752 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-29 05:54:58 +00:00
darin%netscape.com
d0a01665d5 Remove stupid printfs. r=pavlov, sr=darin
git-svn-id: svn://10.0.0.236/trunk@90098 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-22 08:34:34 +00:00
gordon%netscape.com
7b8581452d Landing MOZ_NEW_CACHE_20010314_BRANCH, incorporating feedback from recent test builds. New cache is still disabled by default.
git-svn-id: svn://10.0.0.236/trunk@89933 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-20 22:42:03 +00:00
darin%netscape.com
ed9b1f24cd [not part of the build] Make nsICacheEntryDescriptor inherit from nsICacheEntryInfo
git-svn-id: svn://10.0.0.236/trunk@89561 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 01:11:14 +00:00
gordon%netscape.com
8d57282cf0 [not part of build]
Implement simple LRU eviction mechanism for nsMemoryCacheDevice.
Add cleanup code to nsCacheService to fix intermittent crashes on shutdown.
Calculate MetaData size, and update field in nsCacheEntry.
Begin implmentation of nsICacheDeviceInfo in nsMemoryCacheDevice for about:cache.
Added various statistics to nsCacheService and nsMemoryCacheDevice.


git-svn-id: svn://10.0.0.236/trunk@89508 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 15:43:17 +00:00
beard%netscape.com
1c5610f321 [not part of build] Implemented nsCacheEntryDescriptor::GetFile().
git-svn-id: svn://10.0.0.236/trunk@88984 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 21:22:18 +00:00
beard%netscape.com
b5ecde3753 [not part of build] stub implementation of Visit().
Changed Cache directory creation logic in nsDiskCacheDevice.cpp.


git-svn-id: svn://10.0.0.236/trunk@88983 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 21:00:02 +00:00
gordon%netscape.com
95787ca5fb [not part of build]
Removed return codes for nsCacheEntryHashtable::RemoveEntry() and nsCacheDevice::DoomEntry().

Added doomEntriesIfExpired flag to nsCacheSession and nsCacheRequest, and check the flag in nsCacheService::ActivateEntry()

Added lastModified attribute to nsCacheEntryDescriptor and mLastModified data member to nsCacheEntry.  mLastModified is updated when data or meta data is changed.

Deque requests if descriptor allocation fails.  Delete requests after calling proxy in async open cache entry path.

Cleaned up the logic of doom.


git-svn-id: svn://10.0.0.236/trunk@88929 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 05:37:00 +00:00
gordon%netscape.com
bf68e87589 [not part of build]
Added rough cut of pref code for memory cache device to get cache size, and implemented simple eviction method.

Restructured nsCacheEntryDescriptor to add SecurityInfo attribute.  Created nsTransportWrapper as nested class (and member) that addrefs the descriptor instead of itself (like nsPipe).  Also rename nsCacheOutputStream to nsOutputStreamWrapper and made it a nested class as well.


git-svn-id: svn://10.0.0.236/trunk@88816 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 09:27:36 +00:00
gordon%netscape.com
0ea21fde31 [not part of build]
Restructured open cache entry code in preparation for async implementation, to better share code with synchronous version.

Changed nsCacheRequest, nsCacheEntry, nsCacheEntryDescriptor to inherit from PRCList rather than include mListLink member, and removed extraneous GetListNode/GetInstance methods.

Consolidated mAccessRequested, mStreamBased, and mStoragePolicy into a single PRUint32 in nsCacheRequest.  Added PRLock, PRCondVar, and a 'wait for validation' flag, used for synchronously opening cache entries.  Added accessor functions for these "attributes".

Record current event queue for asychronous requests to be used with GetProxyForObject().  Removed mRequestThread.


git-svn-id: svn://10.0.0.236/trunk@88535 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 07:17:58 +00:00
gordon%netscape.com
3631c00985 [not part of build] Changed nsCacheEntry data members from PRTime to PRUint32. Changed //** comments to // XXX to make it easier to search for 'to do' items. Added dooming of expired entries.
git-svn-id: svn://10.0.0.236/trunk@88499 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 00:11:30 +00:00
gordon%netscape.com
9618aa2ef4 [not part of build] Make MarkDoomed(), MarkActive(), MarkInactive() private, and check for entry before calling MarkInitialized() in nsCacheService::ActivateEntry().
git-svn-id: svn://10.0.0.236/trunk@88476 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 04:42:21 +00:00
gordon%netscape.com
036ebd2234 [not part of build] Restructured nsCacheService:ActivateEntry() to properly handle a FORCE-WRITE. Cleaned up ownership of key between request and entry. Add deletion of request for synchronous open. Add deletion of unbound entries on deactivation.
git-svn-id: svn://10.0.0.236/trunk@88458 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 02:27:49 +00:00
darin%netscape.com
1f2afac93b [not part of the build] Make mem cache use nsStorageTransport.
git-svn-id: svn://10.0.0.236/trunk@88444 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 01:59:03 +00:00
gordon%netscape.com
383d3db210 [not part of build]
Fixed cache meta data. Implemented eviction list for memory cache device. Worked on entry deactivation, validation, and doom.


git-svn-id: svn://10.0.0.236/trunk@88364 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:51:41 +00:00
darin%netscape.com
5e3138cd0b [not part of the build] Removed knowledge of nsCacheEntry from nsMemoryCacheTransport,
and fixed a bug in the blocking output stream (it claimed to be non blocking).


git-svn-id: svn://10.0.0.236/trunk@88306 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 19:33:00 +00:00
gordon%netscape.com
9bbc213f93 [not part of build]
Changed OnDataSizeChanged() to OnDataSizeChange() and added a deltaSize parameter.  Added OnDataSizeChange() method on nsCacheService so we can grab the service lock and bind the entry if necessary.

Commented out the implementation of nsCacheEntryDescriptor::AsyncWrite(), since we are not planning to provide it.


git-svn-id: svn://10.0.0.236/trunk@88275 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 05:01:43 +00:00
darin%netscape.com
a31f0fcaf2 [not part of the build] Added code to update the entry's data size as data is streamed
to the memory cache.


git-svn-id: svn://10.0.0.236/trunk@88265 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 02:49:26 +00:00
beard%netscape.com
ff1dfa18a0 [not part of build] enforce nsCacheAccessMode when creating transports.
git-svn-id: svn://10.0.0.236/trunk@88183 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 10:04:27 +00:00
darin%netscape.com
caa5ad9408 Made nsMemoryCacheDevice::BindEntry return NS_OK
git-svn-id: svn://10.0.0.236/trunk@88173 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 04:36:51 +00:00
gordon%netscape.com
4fe759cae0 Added DoomEntry() to nsCacheDevice.
git-svn-id: svn://10.0.0.236/trunk@88162 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 03:42:33 +00:00
darin%netscape.com
f0ac194aeb [not part of the build] Added hooks to enable streaming to the mem cache!
git-svn-id: svn://10.0.0.236/trunk@88149 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 01:41:02 +00:00