diff --git a/src/ResponseCaching/README.md b/src/ResponseCaching/README.md index 5c6ea8d9c8..c0d6b43323 100644 --- a/src/ResponseCaching/README.md +++ b/src/ResponseCaching/README.md @@ -1,9 +1,8 @@ -ASP.NET Core Response Caching -======== -AppVeyor: [![AppVeyor](https://ci.appveyor.com/api/projects/status/p52yj0kghdyicvwu/branch/dev?svg=true)](https://ci.appveyor.com/project/aspnetci/ResponseCaching/branch/dev) +ASP.NET Core Response Caching [Archived] +======================================== -Travis: [![Travis](https://travis-ci.org/aspnet/ResponseCaching.svg?branch=dev)](https://travis-ci.org/aspnet/ResponseCaching) +**This GitHub project has been archived.** Ongoing development on this project can be found in . This repo hosts the ASP.NET Core middleware for response caching. -This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo. +This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [AspNetCore](https://github.com/aspnet/AspNetCore) repo. diff --git a/src/ResponseCaching/build/dependencies.props b/src/ResponseCaching/build/dependencies.props index 0b8134e340..2229ff3e25 100644 --- a/src/ResponseCaching/build/dependencies.props +++ b/src/ResponseCaching/build/dependencies.props @@ -3,24 +3,24 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview2-20181004.6 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 + 3.0.0-alpha1-20181004.7 + 3.0.0-alpha1-10584 + 3.0.0-alpha1-10584 + 3.0.0-alpha1-10584 + 3.0.0-alpha1-10584 + 3.0.0-alpha1-10584 + 3.0.0-alpha1-10584 + 3.0.0-alpha1-10584 + 3.0.0-alpha1-10584 + 3.0.0-alpha1-10584 2.0.9 2.1.3 - 2.2.0-preview3-27001-02 + 2.2.0-preview2-26905-02 15.6.1 2.0.3 2.3.1 2.4.0 - + diff --git a/src/ResponseCaching/build/repo.props b/src/ResponseCaching/build/repo.props index f1fe24dd27..17a98ac7e7 100644 --- a/src/ResponseCaching/build/repo.props +++ b/src/ResponseCaching/build/repo.props @@ -4,7 +4,6 @@ Internal.AspNetCore.Universe.Lineup - 2.2.0-* https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json diff --git a/src/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching/ResponseCachingServicesExtensions.cs b/src/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching/ResponseCachingServicesExtensions.cs index ef6f815b5e..865bb7cadc 100644 --- a/src/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching/ResponseCachingServicesExtensions.cs +++ b/src/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching/ResponseCachingServicesExtensions.cs @@ -25,7 +25,6 @@ namespace Microsoft.Extensions.DependencyInjection throw new ArgumentNullException(nameof(services)); } - services.AddMemoryCache(); services.TryAdd(ServiceDescriptor.Singleton()); services.TryAdd(ServiceDescriptor.Singleton()); diff --git a/src/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests/ResponseCachingTests.cs b/src/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests/ResponseCachingTests.cs index 25fc1360e8..b8ea8cc49e 100644 --- a/src/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests/ResponseCachingTests.cs +++ b/src/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests/ResponseCachingTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests [Theory] [InlineData("GET")] [InlineData("HEAD")] - public async void ServesCachedContent_IfAvailable(string method) + public async Task ServesCachedContent_IfAvailable(string method) { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -39,7 +39,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests [Theory] [InlineData("GET")] [InlineData("HEAD")] - public async void ServesFreshContent_IfNotAvailable(string method) + public async Task ServesFreshContent_IfNotAvailable(string method) { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -57,7 +57,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_Post() + public async Task ServesFreshContent_Post() { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -75,7 +75,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_Head_Get() + public async Task ServesFreshContent_Head_Get() { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -93,7 +93,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_Get_Head() + public async Task ServesFreshContent_Get_Head() { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -113,7 +113,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests [Theory] [InlineData("GET")] [InlineData("HEAD")] - public async void ServesFreshContent_If_CacheControlNoCache(string method) + public async Task ServesFreshContent_If_CacheControlNoCache(string method) { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -142,7 +142,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests [Theory] [InlineData("GET")] [InlineData("HEAD")] - public async void ServesFreshContent_If_PragmaNoCache(string method) + public async Task ServesFreshContent_If_PragmaNoCache(string method) { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -171,7 +171,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests [Theory] [InlineData("GET")] [InlineData("HEAD")] - public async void ServesCachedContent_If_PathCasingDiffers(string method) + public async Task ServesCachedContent_If_PathCasingDiffers(string method) { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -191,7 +191,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests [Theory] [InlineData("GET")] [InlineData("HEAD")] - public async void ServesFreshContent_If_ResponseExpired(string method) + public async Task ServesFreshContent_If_ResponseExpired(string method) { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -211,7 +211,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests [Theory] [InlineData("GET")] [InlineData("HEAD")] - public async void ServesFreshContent_If_Authorization_HeaderExists(string method) + public async Task ServesFreshContent_If_Authorization_HeaderExists(string method) { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -230,7 +230,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfVaryHeader_Matches() + public async Task ServesCachedContent_IfVaryHeader_Matches() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.Headers[HeaderNames.Vary] = HeaderNames.From); @@ -249,7 +249,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfVaryHeader_Mismatches() + public async Task ServesFreshContent_IfVaryHeader_Mismatches() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.Headers[HeaderNames.Vary] = HeaderNames.From); @@ -269,7 +269,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfVaryQueryKeys_Matches() + public async Task ServesCachedContent_IfVaryQueryKeys_Matches() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Features.Get().VaryByQueryKeys = new[] { "query" }); @@ -287,7 +287,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfVaryQueryKeysExplicit_Matches_QueryKeyCaseInsensitive() + public async Task ServesCachedContent_IfVaryQueryKeysExplicit_Matches_QueryKeyCaseInsensitive() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Features.Get().VaryByQueryKeys = new[] { "QueryA", "queryb" }); @@ -305,7 +305,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfVaryQueryKeyStar_Matches_QueryKeyCaseInsensitive() + public async Task ServesCachedContent_IfVaryQueryKeyStar_Matches_QueryKeyCaseInsensitive() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Features.Get().VaryByQueryKeys = new[] { "*" }); @@ -323,7 +323,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfVaryQueryKeyExplicit_Matches_OrderInsensitive() + public async Task ServesCachedContent_IfVaryQueryKeyExplicit_Matches_OrderInsensitive() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Features.Get().VaryByQueryKeys = new[] { "QueryB", "QueryA" }); @@ -341,7 +341,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfVaryQueryKeyStar_Matches_OrderInsensitive() + public async Task ServesCachedContent_IfVaryQueryKeyStar_Matches_OrderInsensitive() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Features.Get().VaryByQueryKeys = new[] { "*" }); @@ -359,7 +359,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfVaryQueryKey_Mismatches() + public async Task ServesFreshContent_IfVaryQueryKey_Mismatches() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Features.Get().VaryByQueryKeys = new[] { "query" }); @@ -377,7 +377,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfVaryQueryKeyExplicit_Mismatch_QueryKeyCaseSensitive() + public async Task ServesFreshContent_IfVaryQueryKeyExplicit_Mismatch_QueryKeyCaseSensitive() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Features.Get().VaryByQueryKeys = new[] { "QueryA", "QueryB" }); @@ -395,7 +395,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfVaryQueryKeyStar_Mismatch_QueryKeyValueCaseSensitive() + public async Task ServesFreshContent_IfVaryQueryKeyStar_Mismatch_QueryKeyValueCaseSensitive() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Features.Get().VaryByQueryKeys = new[] { "*" }); @@ -413,7 +413,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfRequestRequirements_NotMet() + public async Task ServesFreshContent_IfRequestRequirements_NotMet() { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -435,7 +435,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void Serves504_IfOnlyIfCachedHeader_IsSpecified() + public async Task Serves504_IfOnlyIfCachedHeader_IsSpecified() { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -458,7 +458,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfSetCookie_IsSpecified() + public async Task ServesFreshContent_IfSetCookie_IsSpecified() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.Headers[HeaderNames.SetCookie] = "cookieName=cookieValue"); @@ -476,7 +476,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfIHttpSendFileFeature_NotUsed() + public async Task ServesCachedContent_IfIHttpSendFileFeature_NotUsed() { var builders = TestUtils.CreateBuildersWithResponseCaching(app => { @@ -501,7 +501,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfIHttpSendFileFeature_Used() + public async Task ServesFreshContent_IfIHttpSendFileFeature_Used() { var builders = TestUtils.CreateBuildersWithResponseCaching( app => @@ -528,7 +528,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfSubsequentRequestContainsNoStore() + public async Task ServesCachedContent_IfSubsequentRequestContainsNoStore() { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -550,7 +550,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfInitialRequestContainsNoStore() + public async Task ServesFreshContent_IfInitialRequestContainsNoStore() { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -572,7 +572,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfInitialResponseContainsNoStore() + public async Task ServesFreshContent_IfInitialResponseContainsNoStore() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.Headers[HeaderNames.CacheControl] = CacheControlHeaderValue.NoStoreString); @@ -590,7 +590,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void Serves304_IfIfModifiedSince_Satisfied() + public async Task Serves304_IfIfModifiedSince_Satisfied() { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -610,7 +610,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfIfModifiedSince_NotSatisfied() + public async Task ServesCachedContent_IfIfModifiedSince_NotSatisfied() { var builders = TestUtils.CreateBuildersWithResponseCaching(); @@ -629,7 +629,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void Serves304_IfIfNoneMatch_Satisfied() + public async Task Serves304_IfIfNoneMatch_Satisfied() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue("\"E1\"")); @@ -649,7 +649,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfIfNoneMatch_NotSatisfied() + public async Task ServesCachedContent_IfIfNoneMatch_NotSatisfied() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue("\"E1\"")); @@ -668,7 +668,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfBodySize_IsCacheable() + public async Task ServesCachedContent_IfBodySize_IsCacheable() { var builders = TestUtils.CreateBuildersWithResponseCaching(options: new ResponseCachingOptions() { @@ -689,7 +689,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfBodySize_IsNotCacheable() + public async Task ServesFreshContent_IfBodySize_IsNotCacheable() { var builders = TestUtils.CreateBuildersWithResponseCaching(options: new ResponseCachingOptions() { @@ -710,7 +710,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_CaseSensitivePaths_IsNotCacheable() + public async Task ServesFreshContent_CaseSensitivePaths_IsNotCacheable() { var builders = TestUtils.CreateBuildersWithResponseCaching(options: new ResponseCachingOptions() { @@ -731,7 +731,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_WithoutReplacingCachedVaryBy_OnCacheMiss() + public async Task ServesCachedContent_WithoutReplacingCachedVaryBy_OnCacheMiss() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.Headers[HeaderNames.Vary] = HeaderNames.From); @@ -753,7 +753,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesFreshContent_IfCachedVaryByUpdated_OnCacheMiss() + public async Task ServesFreshContent_IfCachedVaryByUpdated_OnCacheMiss() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.Headers[HeaderNames.Vary] = context.Request.Headers[HeaderNames.Pragma]); @@ -784,7 +784,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests } [Fact] - public async void ServesCachedContent_IfCachedVaryByNotUpdated_OnCacheMiss() + public async Task ServesCachedContent_IfCachedVaryByNotUpdated_OnCacheMiss() { var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.Headers[HeaderNames.Vary] = context.Request.Headers[HeaderNames.Pragma]); diff --git a/src/ResponseCaching/version.props b/src/ResponseCaching/version.props index 4889a26987..d977b437b6 100644 --- a/src/ResponseCaching/version.props +++ b/src/ResponseCaching/version.props @@ -1,12 +1,6 @@ - + - 2.2.0 - rtm - $(VersionPrefix) - $(VersionPrefix)-$(VersionSuffix)-final - t000 - a- - $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) - $(VersionSuffix)-$(BuildNumber) + 3.0.0 + dev