diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-01-10 18:52:18 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-01-10 18:52:18 +0200 |
commit | c8f761fe939fdfe15474ae8e4e6826a1ba4bcdd6 (patch) | |
tree | 854da2d00878630b40a515fb9cecabe5283c7383 /indra/newview/llappviewer.cpp | |
parent | edc641fb0b3bc535d52a600381b3959203c5492b (diff) |
SL-15083 Add 'DiskCacheVersion' to keep 'filesystem cache' in check
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f3f74ee3af..26fa93f492 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4179,6 +4179,15 @@ U32 LLAppViewer::getTextureCacheVersion() } //static +U32 LLAppViewer::getDiskCacheVersion() +{ + // Viewer disk cache version intorduced in Simple Cache Viewer, change if the cache format changes. + const U32 DISK_CACHE_VERSION = 1; + + return DISK_CACHE_VERSION ; +} + +//static U32 LLAppViewer::getObjectCacheVersion() { // Viewer object cache version, change if object update @@ -4258,7 +4267,13 @@ bool LLAppViewer::initCache() if (!read_only) { - if (mPurgeCache) + if (gSavedSettings.getS32("DiskCacheVersion") != LLAppViewer::getDiskCacheVersion()) + { + LLDiskCache::getInstance()->clearCache(); + gSavedSettings.setS32("DiskCacheVersion", LLAppViewer::getDiskCacheVersion()); + } + + if (mPurgeCache) { LLSplashScreen::update(LLTrans::getString("StartupClearingCache")); purgeCache(); |