From c3289bd1c89378b8a759b799559e8ef48c640f4a Mon Sep 17 00:00:00 2001 From: arnova Date: Sun, 25 Oct 2015 10:56:41 +0100 Subject: changed: Increase maximum amount of cached directories to 50 --- xbmc/filesystem/DirectoryCache.cpp | 6 ++++-- 1 file 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 +// 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& 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); } -- cgit v1.2.3