ModelsBuilder enabled flag not respected
When MB is disabled we were still rebuilding all of nucache models when schema changes are made which is a requirement of PureLive models but if MB is disabled then PureLive models don't matter. This was causing unnecessary performance and db overhead when modifying document types when mb is disabled.
This commit is contained in:
@@ -21,7 +21,7 @@ using File = System.IO.File;
|
||||
|
||||
namespace Umbraco.ModelsBuilder.Embedded
|
||||
{
|
||||
internal class PureLiveModelFactory : ILivePublishedModelFactory, IRegisteredObject
|
||||
internal class PureLiveModelFactory : ILivePublishedModelFactory2, IRegisteredObject
|
||||
{
|
||||
private Assembly _modelsAssembly;
|
||||
private Infos _infos = new Infos { ModelInfos = null, ModelTypeMap = new Dictionary<string, Type>() };
|
||||
@@ -134,6 +134,13 @@ namespace Umbraco.ModelsBuilder.Embedded
|
||||
return ctor();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Reset()
|
||||
{
|
||||
if (_config.Enable)
|
||||
ResetModels();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Compilation
|
||||
|
||||
Reference in New Issue
Block a user