From 933691ad133b552be3fdd26b0d9d26a09c3a7aa5 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 20 Mar 2013 16:29:48 -0600 Subject: for SH-4004: interesting: need debug option to clear viewer cache while still logged in --- indra/newview/llappviewer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0cb7c7b030..dc07c8f13b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4006,6 +4006,14 @@ void LLAppViewer::purgeCache() gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), "*.*"); } +//purge cache immediately, do not wait until the next login. +void LLAppViewer::purgeCacheImmediate() +{ + LL_INFOS("AppCache") << "Purging Object Cache and Texture Cache immediately..." << LL_ENDL; + LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE); + LLVOCache::getInstance()->removeCache(LL_PATH_CACHE, true); +} + std::string LLAppViewer::getSecondLifeTitle() const { return LLTrans::getString("APP_NAME"); -- cgit v1.2.3