mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
adding hash ability to image loader (reducing the load on memory)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user