Updated memory cache fields.

This commit is contained in:
2025-02-26 19:10:51 -05:00
parent dfdf514fe2
commit 6835431d1e
2 changed files with 7 additions and 3 deletions

View File

@@ -5,6 +5,10 @@ namespace Harmonia.Core.Caching;
public class AudioImageMemoryCache(IAudioImageExtractor audioImageExtractor) : MemoryCache<Song, SongPictureInfo>, IAudioImageCache
{
protected override long? SizeLimit => 2000000000;
protected override double CompactionPercentage => 0.2;
protected override TimeSpan SlidingExpiration => TimeSpan.FromSeconds(600);
protected override object? GetKey(Song key)
{
if (string.IsNullOrWhiteSpace(key.ImageHash) == false)