Merge branch temp8 into temp8-packages-ui
This commit is contained in:
@@ -69,8 +69,9 @@ namespace Umbraco.Tests.PublishedContent
|
||||
factory.CreatePropertyType("testRecursive", 1),
|
||||
};
|
||||
var compositionAliases = new[] { "MyCompositionAlias" };
|
||||
var type = new AutoPublishedContentType(0, "anything", compositionAliases, propertyTypes);
|
||||
ContentTypesCache.GetPublishedContentTypeByAlias = alias => type;
|
||||
var anythingType = new AutoPublishedContentType(0, "anything", compositionAliases, propertyTypes);
|
||||
var homeType = new AutoPublishedContentType(0, "home", compositionAliases, propertyTypes);
|
||||
ContentTypesCache.GetPublishedContentTypeByAlias = alias => alias.InvariantEquals("home") ? homeType : anythingType;
|
||||
}
|
||||
|
||||
protected override TypeLoader CreateTypeLoader(IRuntimeCacheProvider runtimeCache, IGlobalSettings globalSettings, IProfilingLogger logger)
|
||||
@@ -236,6 +237,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
public void Is_Last_From_Where_Filter2()
|
||||
{
|
||||
var doc = GetNode(1173);
|
||||
var ct = doc.ContentType;
|
||||
|
||||
var items = doc.Children
|
||||
.Select(x => x.CreateModel()) // linq, returns IEnumerable<IPublishedContent>
|
||||
@@ -454,11 +456,11 @@ namespace Umbraco.Tests.PublishedContent
|
||||
{
|
||||
var doc = GetNode(1046); // has child nodes
|
||||
|
||||
var model = doc.FirstChild<Anything>(x => true); // predicate
|
||||
var model = doc.FirstChild<Home>(x => true); // predicate
|
||||
|
||||
Assert.IsNotNull(model);
|
||||
Assert.IsTrue(model.Id == 1173);
|
||||
Assert.IsInstanceOf<Anything>(model);
|
||||
Assert.IsInstanceOf<Home>(model);
|
||||
Assert.IsInstanceOf<IPublishedContent>(model);
|
||||
|
||||
doc = GetNode(1175); // does not have child nodes
|
||||
|
||||
@@ -44,16 +44,14 @@ namespace Umbraco.Web.Cache
|
||||
|
||||
public override void Refresh(JsonPayload[] payloads)
|
||||
{
|
||||
var runtimeCache = Current.ApplicationCache.RuntimeCache;
|
||||
|
||||
runtimeCache.ClearCacheObjectTypes<PublicAccessEntry>();
|
||||
CacheHelper.RuntimeCache.ClearCacheObjectTypes<PublicAccessEntry>();
|
||||
|
||||
var idsRemoved = new HashSet<int>();
|
||||
var isolatedCache = CacheHelper.IsolatedRuntimeCache.GetOrCreateCache<IContent>();
|
||||
|
||||
foreach (var payload in payloads)
|
||||
{
|
||||
// remove that one
|
||||
runtimeCache.ClearCacheItem(RepositoryCacheKeys.GetKey<IContent>(payload.Id));
|
||||
isolatedCache.ClearCacheItem(RepositoryCacheKeys.GetKey<IContent>(payload.Id));
|
||||
|
||||
_idkMap.ClearCache(payload.Id);
|
||||
|
||||
@@ -61,7 +59,7 @@ namespace Umbraco.Web.Cache
|
||||
if (payload.ChangeTypes.HasTypesAny(TreeChangeTypes.RefreshBranch | TreeChangeTypes.Remove))
|
||||
{
|
||||
var pathid = "," + payload.Id + ",";
|
||||
runtimeCache.ClearCacheObjectTypes<IContent>((k, v) => v.Path.Contains(pathid));
|
||||
isolatedCache.ClearCacheObjectTypes<IContent>((k, v) => v.Path.Contains(pathid));
|
||||
}
|
||||
|
||||
//if the item is being completely removed, we need to refresh the domains cache if any domain was assigned to the content
|
||||
|
||||
@@ -149,6 +149,7 @@ namespace Umbraco.Web.Scheduling
|
||||
|
||||
var periodInMilliseconds = healthCheckConfig.NotificationSettings.PeriodInHours * 60 * 60 * 1000;
|
||||
var task = new HealthCheckNotifier(_healthCheckRunner, delayInMilliseconds, periodInMilliseconds, healthChecks, notifications, _runtime, logger);
|
||||
_healthCheckRunner.TryAdd(task);
|
||||
return task;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user