adding hash ability to image loader (reducing the load on memory)

This commit is contained in:
AT
2020-01-03 21:16:17 +02:00
parent c63e8d32c9
commit b14d6c9216
5 changed files with 141 additions and 20 deletions

View File

@@ -39,6 +39,19 @@ namespace Wox.Infrastructure.Image
var contains = _data.ContainsKey(key);
return contains;
}
public int CacheSize()
{
return _data.Count;
}
/// <summary>
/// return the number of unique images in the cache (by reference not by checking images content)
/// </summary>
public int UniqueImagesInCache()
{
return _data.Values.Distinct().Count();
}
}
}