rename property

This commit is contained in:
Shannon
2021-01-08 00:33:47 +11:00
parent 504837054e
commit 53bc92608a
4 changed files with 8 additions and 5 deletions

View File

@@ -72,6 +72,9 @@ namespace Umbraco.Web.Routing
/// </summary>
IReadOnlyDictionary<string, string> Headers { get; }
bool CacheabilityNoCache { get; }
/// <summary>
/// Gets a value indicating if the no-cache value should be added to the Cache-Control header
/// </summary>
bool SetNoCacheHeader { get; }
}
}

View File

@@ -27,7 +27,7 @@ namespace Umbraco.Web.Routing
ResponseStatusCode = responseStatusCode;
CacheExtensions = cacheExtensions;
Headers = headers;
CacheabilityNoCache = cacheabilityNoCache;
SetNoCacheHeader = cacheabilityNoCache;
}
/// <inheritdoc/>
@@ -64,6 +64,6 @@ namespace Umbraco.Web.Routing
public IReadOnlyDictionary<string, string> Headers { get; }
/// <inheritdoc/>
public bool CacheabilityNoCache { get; }
public bool SetNoCacheHeader { get; }
}
}

View File

@@ -81,7 +81,7 @@ namespace Umbraco.Tests.UnitTests.Umbraco.Core.Web.Routing
IPublishedRequest request = sut.Build();
Assert.AreEqual(true, request.CacheabilityNoCache);
Assert.AreEqual(true, request.SetNoCacheHeader);
Assert.AreEqual(cacheExt, request.CacheExtensions);
Assert.AreEqual(usCulture, request.Culture);
Assert.AreEqual(domain, request.Domain);

View File

@@ -55,7 +55,7 @@ namespace Umbraco.Web.Common.Controllers
{
var cacheControlHeaders = new List<string>();
if (pcr.CacheabilityNoCache)
if (pcr.SetNoCacheHeader)
{
cacheControlHeaders.Add("no-cache");
}