Update MemoryCache DI.

This commit is contained in:
Chris Ross 2014-10-20 11:30:53 -07:00
parent cd9362c92b
commit 390bf8f024
3 changed files with 3 additions and 6 deletions

View File

@ -92,8 +92,7 @@ namespace MusicStore
services.AddSignalR(); services.AddSignalR();
//Add InMemoryCache //Add InMemoryCache
//Currently not able to AddSingleTon services.AddSingleton<IMemoryCache, MemoryCache>();
services.AddInstance<IMemoryCache>(new MemoryCache());
}); });
//To gracefully shutdown the server - Not for production scenarios //To gracefully shutdown the server - Not for production scenarios

View File

@ -84,8 +84,7 @@ namespace MusicStore
services.AddSignalR(); services.AddSignalR();
//Add InMemoryCache //Add InMemoryCache
//Currently not able to AddSingleTon services.AddSingleton<IMemoryCache, MemoryCache>();
services.AddInstance<IMemoryCache>(new MemoryCache());
} }
//This method is invoked when KRE_ENV is 'Development' or is not defined //This method is invoked when KRE_ENV is 'Development' or is not defined

View File

@ -86,8 +86,7 @@ namespace MusicStore
services.AddSignalR(); services.AddSignalR();
//Add InMemoryCache //Add InMemoryCache
//Currently not able to AddSingleTon services.AddSingleton<IMemoryCache, MemoryCache>();
services.AddInstance<IMemoryCache>(new MemoryCache());
}); });
//Configure SignalR //Configure SignalR