update caching headers

This commit is contained in:
Luke Pulverenti
2016-11-27 14:36:56 -05:00
parent b485c4ca51
commit 26ef23d628
12 changed files with 139 additions and 67 deletions

View File

@@ -88,11 +88,14 @@ namespace Emby.Server.Implementations.Data
var queries = new List<string>
{
"PRAGMA temp_store = memory",
//"PRAGMA journal_mode=WAL"
//"PRAGMA cache size=-10000"
};
if (EnableTempStoreMemory)
{
queries.Add("PRAGMA temp_store = memory");
}
//var cacheSize = CacheSize;
//if (cacheSize.HasValue)
//{
@@ -116,7 +119,7 @@ namespace Emby.Server.Implementations.Data
db.ExecuteAll(string.Join(";", queries.ToArray()));
}
}
else
else if (queries.Count > 0)
{
db.ExecuteAll(string.Join(";", queries.ToArray()));
}
@@ -124,6 +127,14 @@ namespace Emby.Server.Implementations.Data
return db;
}
protected virtual bool EnableTempStoreMemory
{
get
{
return false;
}
}
protected virtual int? CacheSize
{
get