Revert "Disable cache feature"

This reverts commit 9a597f2b4d.
This commit is contained in:
Jack251970 2025-09-18 21:45:24 +08:00
parent 9a597f2b4d
commit bbc12ec041

View file

@ -15,9 +15,8 @@ public static class WallpaperPathRetrieval
{
private static readonly string ClassName = nameof(WallpaperPathRetrieval);
// Disable cache feature because some wallpaper applications (like Wallpaper Engine) may change wallpaper frequently
private const int MaxCacheSize = 0;//3;
private static readonly Dictionary<(string, DateTime), ImageBrush> WallpaperCache = [];
private const int MaxCacheSize = 3;
private static readonly Dictionary<(string, DateTime), ImageBrush> WallpaperCache = new();
private static readonly Lock CacheLock = new();
public static Brush GetWallpaperBrush()