diff --git a/src/Orchard.Web/Core/Settings/Descriptor/ShellDescriptorManager.cs b/src/Orchard.Web/Core/Settings/Descriptor/ShellDescriptorManager.cs index faf80b3ec..7fd7dcbd4 100644 --- a/src/Orchard.Web/Core/Settings/Descriptor/ShellDescriptorManager.cs +++ b/src/Orchard.Web/Core/Settings/Descriptor/ShellDescriptorManager.cs @@ -13,7 +13,7 @@ namespace Orchard.Core.Settings.Descriptor { private readonly IRepository _shellDescriptorRepository; private readonly IShellDescriptorManagerEventHandler _events; private readonly ShellSettings _shellSettings; - + private ShellDescriptorRecord _shellDescriptorRecord; public ShellDescriptorManager( IRepository shellDescriptorRepository, IShellDescriptorManagerEventHandler events, @@ -51,7 +51,10 @@ namespace Orchard.Core.Settings.Descriptor { } private ShellDescriptorRecord GetDescriptorRecord() { - return _shellDescriptorRepository.Get(x => x != null); + if (_shellDescriptorRecord == null) { + _shellDescriptorRecord = _shellDescriptorRepository.Get(x => x != null); + } + return _shellDescriptorRecord; } public void UpdateShellDescriptor(int priorSerialNumber, IEnumerable enabledFeatures, IEnumerable parameters) {