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:
Gary Sharp
2014-05-07 22:45:59 +10:00
parent 6b2cd47610
commit fb6067afc3
19 changed files with 455 additions and 282 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ namespace Disco.Web.Models.Job
if (!string.IsNullOrEmpty(WarrantyProviderId))
WarrantyProvider = Plugins.GetPluginFeature(WarrantyProviderId, typeof(WarrantyProviderFeature));
this.OrganisationAddresses = Database.DiscoConfiguration.OrganisationAddresses.Addresses;
this.OrganisationAddresses = Database.DiscoConfiguration.OrganisationAddresses.Addresses.OrderBy(a => a.Name).ToList();
if (!IsPostBack && !this.OrganisationAddressId.HasValue)
{