From 61b3f70d5c915b67c17a845ed4325ff8c1458f2d Mon Sep 17 00:00:00 2001 From: halgari Date: Mon, 15 Jan 2024 17:23:36 -0700 Subject: [PATCH] Rename caches so that they auto-rehash --- Wabbajack.Services.OSIntegrated/ServiceExtensions.cs | 6 +++--- Wabbajack.VFS.Test/Startup.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs b/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs index 14647411..b2e32519 100644 --- a/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs +++ b/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs @@ -65,14 +65,14 @@ public static class ServiceExtensions service.AddSingleton(s => options.UseLocalCache ? new FileHashCache(s.GetService()!.CreateFile().Path, s.GetService>()!) - : new FileHashCache(KnownFolders.AppDataLocal.Combine("Wabbajack", "GlobalHashCache.sqlite"), + : new FileHashCache(KnownFolders.AppDataLocal.Combine("Wabbajack", "GlobalHashCache2.sqlite"), s.GetService>()!)); service.AddSingleton(s => { var diskCache = options.UseLocalCache ? new VFSDiskCache(s.GetService()!.CreateFile().Path) - : new VFSDiskCache(KnownFolders.WabbajackAppLocal.Combine("GlobalVFSCache4.sqlite")); + : new VFSDiskCache(KnownFolders.WabbajackAppLocal.Combine("GlobalVFSCache5.sqlite")); var cesiCache = new CesiVFSCache(s.GetRequiredService>(), s.GetRequiredService()); return new FallthroughVFSCache(new IVfsCache[] {diskCache}); @@ -92,7 +92,7 @@ public static class ServiceExtensions TimeSpan.FromDays(1), dtos) : new VerificationCache(s.GetRequiredService>(), - KnownFolders.WabbajackAppLocal.Combine("VerificationCacheV2.sqlite"), + KnownFolders.WabbajackAppLocal.Combine("VerificationCacheV3.sqlite"), TimeSpan.FromDays(1), dtos); }); diff --git a/Wabbajack.VFS.Test/Startup.cs b/Wabbajack.VFS.Test/Startup.cs index 44a26e45..4dd8c3e9 100644 --- a/Wabbajack.VFS.Test/Startup.cs +++ b/Wabbajack.VFS.Test/Startup.cs @@ -40,9 +40,9 @@ public class Startup // Keep this fixed at 2 so that we can detect deadlocks in the VFS parallelOptions service.AddSingleton(new ParallelOptions {MaxDegreeOfParallelism = 2}); - service.AddSingleton(new FileHashCache(KnownFolders.EntryPoint.Combine("hashcache.sqlite"), + service.AddSingleton(new FileHashCache(KnownFolders.EntryPoint.Combine("hashcache_2.sqlite"), new Resource("File Hashing", 10))); - service.AddAllSingleton(x => new VFSDiskCache(KnownFolders.EntryPoint.Combine("vfscache.sqlite"))); + service.AddAllSingleton(x => new VFSDiskCache(KnownFolders.EntryPoint.Combine("vfscache_2.sqlite"))); service.AddTransient(); service.AddSingleton(); }