fix: Disable shared cache on SQLITE, reduces SQLITE locking errors.

Per documentation by Sqlite and MS, using `Cache=Shared` is discouraged, especially in combination with WAL. WAL mode is supposed to be the better solution overall, and enabling shared cache changes table locking behaviour increasing errors seen from concurrent actions.
This commit is contained in:
omgbeez 2026-06-03 22:56:37 -04:00
parent 38530cd6fd
commit faf43a2202
No known key found for this signature in database

View file

@ -14,7 +14,7 @@ public static class DiConfig
throw new("Invalid database path found in appSettings");
}
var connectionString = $"Data Source={appSettings.Database.Path};Cache=Shared;Pooling=True;Command Timeout=30";
var connectionString = $"Data Source={appSettings.Database.Path};Cache=Private;Pooling=True;Command Timeout=30";
services.AddDbContext<DataContext>(options => options.UseSqlite(connectionString));
services.AddScoped<DownloadData>();