Disable cache feature

This commit is contained in:
Jack251970 2025-09-18 18:32:13 +08:00
parent fc2e3fec63
commit 9a597f2b4d

View file

@ -15,8 +15,9 @@ public static class WallpaperPathRetrieval
{
private static readonly string ClassName = nameof(WallpaperPathRetrieval);
private const int MaxCacheSize = 3;
private static readonly Dictionary<(string, DateTime), ImageBrush> WallpaperCache = new();
// 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 static readonly Lock CacheLock = new();
public static Brush GetWallpaperBrush()