diff options
author | Oz Linden <oz@lindenlab.com> | 2011-01-19 12:48:04 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-01-19 12:48:04 -0500 |
commit | 061b04132ddf96dc55f962add8bf254bba54bd46 (patch) | |
tree | fc9b743ae37b198cd8199a8fcf2a906e55a82c64 /indra/newview/llvocache.h | |
parent | 6b7a7081c31607bada575dd2f0a226bc5d721fc2 (diff) | |
parent | fde14fa53289d6bad4e3e91930115d7e249f71b8 (diff) |
pull changes back from beta
Diffstat (limited to 'indra/newview/llvocache.h')
-rw-r--r-- | indra/newview/llvocache.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index ed2bc8bafe..e103007979 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -95,10 +95,13 @@ private: { bool operator()(const HeaderEntryInfo* lhs, const HeaderEntryInfo* rhs) const { - return lhs->mTime < rhs->mTime; // older entry in front of queue (set) + if (lhs->mTime == rhs->mTime) + { + return lhs->mHandle < rhs->mHandle; + } + return lhs->mTime < rhs->mTime; // older entry in front } }; - typedef std::set<HeaderEntryInfo*, header_entry_less> header_entry_queue_t; typedef std::map<U64, HeaderEntryInfo*> handle_entry_map_t; private: LLVOCache() ; @@ -125,8 +128,8 @@ private: void removeCache() ; void purgeEntries(); BOOL updateEntry(const HeaderEntryInfo* entry); - BOOL checkRead(LLAPRFile* apr_file, void* src, S32 n_bytes) ; - BOOL checkWrite(LLAPRFile* apr_file, void* src, S32 n_bytes) ; + BOOL checkRead(LLAPRFile* apr_file, void* src, S32 n_bytes, bool remove_cache_on_error = true) ; + BOOL checkWrite(LLAPRFile* apr_file, void* src, S32 n_bytes, bool remove_cache_on_error = true) ; private: BOOL mEnabled; @@ -134,11 +137,9 @@ private: BOOL mReadOnly ; HeaderMetaInfo mMetaInfo; U32 mCacheSize; - U32 mNumEntries; std::string mHeaderFileName ; std::string mObjectCacheDirName; LLVolatileAPRPool* mLocalAPRFilePoolp ; - header_entry_queue_t mHeaderEntryQueue; handle_entry_map_t mHandleEntryMap; static LLVOCache* sInstance ; |