summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-03-20 16:29:48 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-03-20 16:29:48 -0600
commit933691ad133b552be3fdd26b0d9d26a09c3a7aa5 (patch)
tree013fc4663d69057b5f3eff589b33d840e57b8115 /indra/newview/llappviewer.cpp
parent041024e8e5d1f27ab77dc4fa2c1e38b8266e7b41 (diff)
for SH-4004: interesting: need debug option to clear viewer cache while still logged in
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp8
1 files changed, 8 insertions, 0 deletions
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");