Increased sqlite cache size to 30mb
This commit is contained in:
parent
120a75ed8e
commit
4812cb4611
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.Datastore
|
||||||
|
|
||||||
public static string GetConnectionString(string path)
|
public static string GetConnectionString(string path)
|
||||||
{
|
{
|
||||||
return String.Format("Data Source={0};Version=3;", path);
|
return String.Format("Data Source={0};Version=3;Cache Size=30000;", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String MainConnectionString
|
public static String MainConnectionString
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Migrator.Framework;
|
||||||
|
using Migrator.Providers.SQLite;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Datastore
|
||||||
|
{
|
||||||
|
class SqliteProvider
|
||||||
|
{
|
||||||
|
private readonly ITransformationProvider _dataBase;
|
||||||
|
|
||||||
|
public SqliteProvider(string connectionString)
|
||||||
|
{
|
||||||
|
_dataBase = new SQLiteTransformationProvider(new SQLiteDialect(), connectionString);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int GetPageSize()
|
||||||
|
{
|
||||||
|
return Convert.ToInt32(_dataBase.ExecuteScalar("PRAGMA cache_size"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -164,6 +164,7 @@
|
||||||
<Compile Include="Datastore\MigrationLogger.cs" />
|
<Compile Include="Datastore\MigrationLogger.cs" />
|
||||||
<Compile Include="Datastore\Migrations.cs" />
|
<Compile Include="Datastore\Migrations.cs" />
|
||||||
<Compile Include="Datastore\RepositoryProvider.cs" />
|
<Compile Include="Datastore\RepositoryProvider.cs" />
|
||||||
|
<Compile Include="Datastore\SqliteProvider.cs" />
|
||||||
<Compile Include="Helpers\EpisodeRenameHelper.cs" />
|
<Compile Include="Helpers\EpisodeRenameHelper.cs" />
|
||||||
<Compile Include="Helpers\EpisodeSortingHelper.cs" />
|
<Compile Include="Helpers\EpisodeSortingHelper.cs" />
|
||||||
<Compile Include="Helpers\SceneNameHelper.cs" />
|
<Compile Include="Helpers\SceneNameHelper.cs" />
|
||||||
|
|
Loading…
Reference in New Issue