Update: Configuration Optimisation and Caching
Loads entire configuration at start-up (rather than scope-based loading). Deserialization occurs once, with the resulting value cached and replayed if the requested type matches.
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.BI.Job;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Disco.Models.BI.Job;
|
||||
|
||||
namespace Disco.Data.Configuration.Modules
|
||||
{
|
||||
@@ -46,14 +43,14 @@ namespace Disco.Data.Configuration.Modules
|
||||
|
||||
public LocationModes LocationMode
|
||||
{
|
||||
get { return GetFromEnum<LocationModes>(LocationModes.Unrestricted); }
|
||||
set { SetAsEnum(value); }
|
||||
get { return Get<LocationModes>(LocationModes.Unrestricted); }
|
||||
set { Set(value); }
|
||||
}
|
||||
|
||||
public List<string> LocationList
|
||||
{
|
||||
get { return GetFromJson<List<string>>(new List<string>()); }
|
||||
set { SetAsJson(value); }
|
||||
get { return Get<List<string>>(new List<string>()); }
|
||||
set { Set(value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user