NuCache+Scope - tests

This commit is contained in:
Stephan
2017-07-17 17:59:46 +02:00
parent c8052def7a
commit d24ea3c95b
10 changed files with 298 additions and 80 deletions

View File

@@ -224,7 +224,7 @@ namespace Umbraco.Core.Persistence
// ensures that the database is configured, else throws
private void EnsureConfigured()
{
using (new ReadLock(_lock))
using (new ReadLock(_lock)) // fixme - bad, allocations!
{
if (Configured == false)
throw new InvalidOperationException("Not configured.");

View File

@@ -6,8 +6,9 @@ namespace Umbraco.Core.Services.Changes
public enum ContentTypeChangeTypes : byte
{
None = 0,
RefreshMain = 1, // changed, impacts content (adding ppty or composition does NOT)
RefreshOther = 2, // changed, other changes
Remove = 4 // item type has been removed
Create = 1, // item type has been created, no impact
RefreshMain = 2, // changed, impacts content (adding ppty or composition does NOT)
RefreshOther = 4, // changed, other changes
Remove = 8 // item type has been removed
}
}

View File

@@ -125,7 +125,7 @@ namespace Umbraco.Core.Services
var isNewContentType = dirty.WasPropertyDirty("HasIdentity");
if (isNewContentType)
{
AddChange(changes, contentType, ContentTypeChangeTypes.RefreshOther);
AddChange(changes, contentType, ContentTypeChangeTypes.Create);
continue;
}