Update sample to include Redis for Core (#128)

This commit is contained in:
Hisham Bin Ateya 2016-10-05 00:49:56 +03:00 committed by Chris R
parent 8f10080ad0
commit 295d419265
2 changed files with 9 additions and 8 deletions

View File

@ -30,11 +30,15 @@ namespace SessionSample
// o.SchemaName = "dbo";
// o.TableName = "Sessions";
//});
#if NET451
// Uncomment the following line to use the Redis implementation of IDistributedCache.
// This will override any previously registered IDistributedCache service.
//services.AddSingleton<IDistributedCache, RedisCache>();
#endif
//services.AddDistributedRedisCache(o =>
//{
// o.Configuration = "localhost";
// o.InstanceName = "SampleInstance";
//});
services.AddSession(o =>
{
o.IdleTimeout = TimeSpan.FromSeconds(10);

View File

@ -7,6 +7,7 @@
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*",
"Microsoft.AspNetCore.Session": "1.1.0-*",
"Microsoft.Extensions.Caching.Memory": "1.1.0-*",
"Microsoft.Extensions.Caching.Redis": "1.1.0-*",
"Microsoft.Extensions.Caching.SqlServer": "1.1.0-*",
"Microsoft.Extensions.Logging.Console": "1.1.0-*"
},
@ -16,11 +17,7 @@
]
},
"frameworks": {
"net451": {
"dependencies": {
"Microsoft.Extensions.Caching.Redis": "1.1.0-*"
}
},
"net451": {},
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {