Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TurnerSoftware/CacheTower
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dd2409dfdaae49e699742cc7e827eb34cbd8eefb
Choose a base ref
..
head repository: TurnerSoftware/CacheTower
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8e068ba9d2ecc2462eb162bc332e7d8f97e56c70
Choose a head ref
Showing with 4 additions and 3 deletions.
  1. +2 −1 src/CacheTower/Providers/FileSystem/FileCacheLayer.cs
  2. +2 −2 src/CacheTower/Providers/FileSystem/FileCacheLayerOptions.cs
3 changes: 2 additions & 1 deletion src/CacheTower/Providers/FileSystem/FileCacheLayer.cs
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ private async Task TryLoadManifestAsync()
if (File.Exists(ManifestPath))
{
CacheManifest = await DeserializeFileAsync<ConcurrentDictionary<string?, ManifestEntry>>(ManifestPath);
CacheManifest ??= new();
}
else
{
@@ -97,7 +98,7 @@ private async Task TryLoadManifestAsync()
Directory.CreateDirectory(Options.DirectoryPath);
}

CacheManifest = new ConcurrentDictionary<string?, ManifestEntry>();
CacheManifest = new();
await SerializeFileAsync(ManifestPath, CacheManifest);
}
}
4 changes: 2 additions & 2 deletions src/CacheTower/Providers/FileSystem/FileCacheLayerOptions.cs
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@ ICacheSerializer Serializer
)
{
/// <summary>
/// The default manifest save interval of 5 minutes.
/// The default manifest save interval of 30 seconds.
/// </summary>
public static readonly TimeSpan DefaultManifestSaveInterval = TimeSpan.FromMinutes(5);
public static readonly TimeSpan DefaultManifestSaveInterval = TimeSpan.FromSeconds(30);

/// <summary>
/// The time interval controlling how often the cache manifest is saved to disk.