From 52e8b2a1a279e13a39a95b32a301780998b8d8c4 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 28 May 2013 18:25:12 -0600 Subject: for SH-4004: interesting: need debug option to clear viewer cache while still logged in --- indra/newview/llappviewer.cpp | 2 +- indra/newview/lltexturecache.cpp | 4 ++-- indra/newview/lltexturecache.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d36c33cdd7..a602f0d78e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4031,7 +4031,7 @@ void LLAppViewer::purgeCache() void LLAppViewer::purgeCacheImmediate() { LL_INFOS("AppCache") << "Purging Object Cache and Texture Cache immediately..." << LL_ENDL; - LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE); + LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE, false); LLVOCache::getInstance()->removeCache(LL_PATH_CACHE, true); } diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 305f6fca0f..f03cc22949 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -919,7 +919,7 @@ void LLTextureCache::setDirNames(ELLPath location) mFastCacheFileName = gDirUtilp->getExpandedFilename(location, textures_dirname, fast_cache_filename); } -void LLTextureCache::purgeCache(ELLPath location) +void LLTextureCache::purgeCache(ELLPath location, bool remove_dir) { LLMutexLock lock(&mHeaderMutex); @@ -945,7 +945,7 @@ void LLTextureCache::purgeCache(ELLPath location) } //remove the current texture cache. - purgeAllTextures(true); + purgeAllTextures(remove_dir); } //is called in the main thread before initCache(...) is called. diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index e3fc957fd2..5a68c31a6d 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -104,7 +104,7 @@ public: /*virtual*/ S32 update(F32 max_time_ms); - void purgeCache(ELLPath location); + void purgeCache(ELLPath location, bool remove_dir = true); void setReadOnly(BOOL read_only) ; S64 initCache(ELLPath location, S64 maxsize, BOOL texture_cache_mismatch); -- cgit v1.2.3