rename property
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Umbraco.Web.Common.Controllers
|
||||
{
|
||||
var cacheControlHeaders = new List<string>();
|
||||
|
||||
if (pcr.CacheabilityNoCache)
|
||||
if (pcr.SetNoCacheHeader)
|
||||
{
|
||||
cacheControlHeaders.Add("no-cache");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user