21 Commits

Author SHA1 Message Date
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
gordon%netscape.com
b99a60e359 Changed 'getters' on nsCacheEntry to simply return values, rather than require out parameters.
Added a PRCList member and accessors for linking entries on eviction and doom lists.

Moved check for IsStreamBased() from nsCacheEntry::GetData() to nsCacheEntryDescriptor::GetData(), to allow cache devices to set the mData member.

Added checks to nsCacheEntryDescriptor methods to return NS_ERROR_NOT_AVAILABLE if the descriptor is already closed.


git-svn-id: svn://10.0.0.236/trunk@88133 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 00:06:13 +00:00
gordon%netscape.com
8b61a442bc Changed GetKey() to return key as return value, rather than out parameter. Added flag predicates for storage policy.
git-svn-id: svn://10.0.0.236/trunk@88063 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 05:35:53 +00:00
gordon%netscape.com
97665f1086 Begin implementing eviction of memory cache entries.
git-svn-id: svn://10.0.0.236/trunk@87985 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 14:57:40 +00:00
gordon%netscape.com
c1cbcd4c4c Updated new cache source to build with recent changes to interface files. These files are not part of the build. r=beard, darin.
git-svn-id: svn://10.0.0.236/trunk@87862 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-24 01:02:37 +00:00
gordon%netscape.com
cfbd099fb3 Rough first cut of cache service and memory object cache. It currently builds on linux.
git-svn-id: svn://10.0.0.236/trunk@87809 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 13:18:01 +00:00