summaryrefslogtreecommitdiff
path: root/indra/llfilesystem
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-10-08 15:26:54 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-10-08 15:26:54 +0300
commit3051db7b61ee43fffd28f0a12c0714b11b6b7df7 (patch)
tree763df757d2660cf5f124de8f1164136ab2203963 /indra/llfilesystem
parenta818c44ef21cf6b4e4eeab0ee0325a780898fccc (diff)
Purge excessive files from disc cache each startup
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r--indra/llfilesystem/lldiskcache.cpp6
-rw-r--r--indra/llfilesystem/lldiskcache.h2
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.