diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2013-03-20 16:29:48 -0600 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2013-03-20 16:29:48 -0600 |
| commit | 933691ad133b552be3fdd26b0d9d26a09c3a7aa5 (patch) | |
| tree | 013fc4663d69057b5f3eff589b33d840e57b8115 /indra/newview/llvocache.cpp | |
| parent | 041024e8e5d1f27ab77dc4fa2c1e38b8266e7b41 (diff) | |
for SH-4004: interesting: need debug option to clear viewer cache while still logged in
Diffstat (limited to 'indra/newview/llvocache.cpp')
| -rw-r--r-- | indra/newview/llvocache.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 5f112675dc..a08e01784c 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -563,13 +563,19 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version) } } -void LLVOCache::removeCache(ELLPath location) +void LLVOCache::removeCache(ELLPath location, bool started) { + if(started) + { + removeCache(); + return; + } + if(mReadOnly) { llwarns << "Not removing cache at " << location << ": Cache is currently in read-only mode." << llendl; return ; - } + } llinfos << "about to remove the object cache due to settings." << llendl ; @@ -592,10 +598,8 @@ void LLVOCache::removeCache() return ; } - llinfos << "about to remove the object cache due to some error." << llendl ; - std::string mask = "*"; - llinfos << "Removing cache at " << mObjectCacheDirName << llendl; + llinfos << "Removing object cache at " << mObjectCacheDirName << llendl; gDirUtilp->deleteFilesInDir(mObjectCacheDirName, mask); clearCacheInMemory() ; |
