File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 28
28
29
29
#include < algorithm>
30
30
31
+ // Maximum number of directories to keep in our cache
32
+ #define MAX_CACHED_DIRS 50
33
+
31
34
using namespace XFILE ;
32
35
33
36
CDirectoryCache::CDir::CDir (DIR_CACHE_TYPE cacheType)
@@ -232,7 +235,6 @@ void CDirectoryCache::ClearCache(std::set<std::string>& dirs)
232
235
void CDirectoryCache::CheckIfFull ()
233
236
{
234
237
CSingleLock lock (m_cs);
235
- static const unsigned int max_cached_dirs = 10 ;
236
238
237
239
// find the last accessed folder, and remove if the number of cached folders is too many
238
240
iCache lastAccessed = m_cache.end ();
@@ -247,7 +249,7 @@ void CDirectoryCache::CheckIfFull()
247
249
numCached++;
248
250
}
249
251
}
250
- if (lastAccessed != m_cache.end () && numCached >= max_cached_dirs )
252
+ if (lastAccessed != m_cache.end () && numCached >= MAX_CACHED_DIRS )
251
253
Delete (lastAccessed);
252
254
}
253
255
You can’t perform that action at this time.
0 commit comments