Restructure solution layout by module

This commit is contained in:
master
2025-10-28 15:10:40 +02:00
parent 95daa159c4
commit d870da18ce
4103 changed files with 192899 additions and 187024 deletions

View File

@@ -0,0 +1,40 @@
using System.IO;
namespace StellaOps.Scanner.Cache;
public sealed class ScannerCacheOptions
{
private const long DefaultMaxBytes = 5L * 1024 * 1024 * 1024; // 5 GiB
public bool Enabled { get; set; } = true;
public string RootPath { get; set; } = Path.Combine("cache", "scanner");
public string LayersDirectoryName { get; set; } = "layers";
public string FileCasDirectoryName { get; set; } = "cas";
public TimeSpan LayerTtl { get; set; } = TimeSpan.FromDays(45);
public TimeSpan FileTtl { get; set; } = TimeSpan.FromDays(30);
public long MaxBytes { get; set; } = DefaultMaxBytes;
public long WarmBytesThreshold { get; set; } = DefaultMaxBytes / 5; // 20 %
public long ColdBytesThreshold { get; set; } = (DefaultMaxBytes * 4) / 5; // 80 %
public bool EnableAutoEviction { get; set; } = true;
public TimeSpan MaintenanceInterval { get; set; } = TimeSpan.FromMinutes(15);
public bool EnableFileCas { get; set; } = true;
public string? ImportDirectory { get; set; }
public string? ExportDirectory { get; set; }
public string LayersDirectoryPath => Path.Combine(RootPath, LayersDirectoryName);
public string FileCasDirectoryPath => Path.Combine(RootPath, FileCasDirectoryName);
}