summaryrefslogtreecommitdiff
path: root/indra/newview/llvocache.h
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2019-11-13 16:46:27 -0700
committerDave Houlton <euclid@lindenlab.com>2019-11-13 16:46:27 -0700
commitdc1453af9c474c67749aded576c11dff3afdd444 (patch)
treebff4d5bfca6eb036339c30429ef08704d0bb68cb /indra/newview/llvocache.h
parent3dfdb2f6e8be4fb2a08102847520585dc1d8fd7d (diff)
parent78bdf57ad6610b34389226bf941ba736ca0c2225 (diff)
Merge in from viewer-release 6.3.5
Diffstat (limited to 'indra/newview/llvocache.h')
-rw-r--r--indra/newview/llvocache.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index 594d38249b..6c95541c11 100644
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -221,9 +221,9 @@ private:
//
//Note: LLVOCache is not thread-safe
//
-class LLVOCache : public LLSingleton<LLVOCache>
+class LLVOCache : public LLParamSingleton<LLVOCache>
{
- LLSINGLETON(LLVOCache);
+ LLSINGLETON(LLVOCache, bool read_only);
~LLVOCache() ;
private:
@@ -259,15 +259,14 @@ private:
typedef std::map<U64, HeaderEntryInfo*> handle_entry_map_t;
public:
- void initCache(ELLPath location, U32 size, U32 cache_version) ;
+ // We need this init to be separate from constructor, since we might construct cache, purge it, then init.
+ void initCache(ELLPath location, U32 size, U32 cache_version);
void removeCache(ELLPath location, bool started = false) ;
void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ;
void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled);
void removeEntry(U64 handle) ;
- void setReadOnly(bool read_only) {mReadOnly = read_only;}
-
U32 getCacheEntries() { return mNumEntries; }
U32 getCacheEntriesMax() { return mCacheSize; }