aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarnova <arnova@void.org>2015-10-25 10:56:41 +0100
committerarnova <arnova@void.org>2015-10-25 11:28:00 +0100
commitc3289bd1c89378b8a759b799559e8ef48c640f4a (patch)
tree1d00c7f63d215e9fd8301e74de288f22d1301501
parentba7a5167c455b2e42a5dedbf51fc402aa684a514 (diff)
changed: Increase maximum amount of cached directories to 50
-rw-r--r--xbmc/filesystem/DirectoryCache.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xbmc/filesystem/DirectoryCache.cpp b/xbmc/filesystem/DirectoryCache.cpp
index a6dd061160..fe0fe898c9 100644
--- a/xbmc/filesystem/DirectoryCache.cpp
+++ b/xbmc/filesystem/DirectoryCache.cpp
@@ -28,6 +28,9 @@
#include <algorithm>
+// Maximum number of directories to keep in our cache
+#define MAX_CACHED_DIRS 50
+
using namespace XFILE;
CDirectoryCache::CDir::CDir(DIR_CACHE_TYPE cacheType)
@@ -232,7 +235,6 @@ void CDirectoryCache::ClearCache(std::set<std::string>& dirs)
void CDirectoryCache::CheckIfFull()
{
CSingleLock lock (m_cs);
- static const unsigned int max_cached_dirs = 10;
// find the last accessed folder, and remove if the number of cached folders is too many
iCache lastAccessed = m_cache.end();
@@ -247,7 +249,7 @@ void CDirectoryCache::CheckIfFull()
numCached++;
}
}
- if (lastAccessed != m_cache.end() && numCached >= max_cached_dirs)
+ if (lastAccessed != m_cache.end() && numCached >= MAX_CACHED_DIRS)
Delete(lastAccessed);
}