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:
parent
38530cd6fd
commit
faf43a2202
1 changed files with 1 additions and 1 deletions
|
|
@ -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>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue