diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2020-10-08 16:16:38 +0000 |
---|---|---|
committer | Callum Linden <callum@lindenlab.com> | 2020-10-08 16:16:38 +0000 |
commit | 9f6a60cd85b8c5fdc41e741aabc91439508b877a (patch) | |
tree | 763df757d2660cf5f124de8f1164136ab2203963 /indra/llfilesystem | |
parent | a818c44ef21cf6b4e4eeab0ee0325a780898fccc (diff) | |
parent | 3051db7b61ee43fffd28f0a12c0714b11b6b7df7 (diff) |
Merged in maxim_productengine/maxim-viewer/DRTVWR-519 (pull request #332)
Purge excessive files from disc cache each startup
Approved-by: Callum Linden <callum@lindenlab.com>
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r-- | indra/llfilesystem/lldiskcache.cpp | 6 | ||||
-rw-r--r-- | indra/llfilesystem/lldiskcache.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp index e2e50c775d..efe5e7092c 100644 --- a/indra/llfilesystem/lldiskcache.cpp +++ b/indra/llfilesystem/lldiskcache.cpp @@ -215,7 +215,7 @@ const std::string LLDiskCache::getCacheInfo() return cache_info.str(); } -void LLDiskCache::clearCache(const std::string cache_dir) +void LLDiskCache::clearCache() { /** * See notes on performance in dirFileSize(..) - there may be @@ -223,9 +223,9 @@ void LLDiskCache::clearCache(const std::string cache_dir) * the component files but it's called infrequently so it's * likely just fine */ - if (boost::filesystem::is_directory(cache_dir)) + if (boost::filesystem::is_directory(mCacheDir)) { - for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(cache_dir), {})) + for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(mCacheDir), {})) { if (boost::filesystem::is_regular_file(entry)) { diff --git a/indra/llfilesystem/lldiskcache.h b/indra/llfilesystem/lldiskcache.h index f718b7a328..b25eac8538 100644 --- a/indra/llfilesystem/lldiskcache.h +++ b/indra/llfilesystem/lldiskcache.h @@ -126,7 +126,7 @@ class LLDiskCache : * directory individually. Only the files that contain a prefix defined * by mCacheFilenamePrefix will be removed. */ - void clearCache(const std::string cache_dir); + void clearCache(); /** * Return some information about the cache for use in About Box etc. |