Use TaskCache class from Microsoft.Extensions.TaskCache.Sources
This commit is contained in:
parent
411681e8d6
commit
02b8fb3bbc
|
|
@ -6,6 +6,7 @@ using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.Extensions.Internal;
|
||||||
using Microsoft.Extensions.ObjectPool;
|
using Microsoft.Extensions.ObjectPool;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
|
|
@ -16,7 +17,7 @@ namespace Microsoft.AspNetCore.ResponseCaching
|
||||||
private static readonly Func<object, Task> OnStartingCallback = state =>
|
private static readonly Func<object, Task> OnStartingCallback = state =>
|
||||||
{
|
{
|
||||||
((ResponseCachingContext)state).OnResponseStarting();
|
((ResponseCachingContext)state).OnResponseStarting();
|
||||||
return Task.FromResult(0);
|
return TaskCache.CompletedTask;
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly RequestDelegate _next;
|
private readonly RequestDelegate _next;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,11 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNetCore.Http": "1.1.0-*",
|
"Microsoft.AspNetCore.Http": "1.1.0-*",
|
||||||
"Microsoft.AspNetCore.Http.Extensions": "1.1.0-*",
|
"Microsoft.AspNetCore.Http.Extensions": "1.1.0-*",
|
||||||
"Microsoft.Extensions.Caching.Memory": "1.1.0-*"
|
"Microsoft.Extensions.Caching.Memory": "1.1.0-*",
|
||||||
|
"Microsoft.Extensions.TaskCache.Sources": {
|
||||||
|
"version": "1.1.0-*",
|
||||||
|
"type": "build"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net451": {},
|
"net451": {},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue