Update MemoryCache DI.
This commit is contained in:
parent
cd9362c92b
commit
390bf8f024
|
|
@ -92,8 +92,7 @@ namespace MusicStore
|
|||
services.AddSignalR();
|
||||
|
||||
//Add InMemoryCache
|
||||
//Currently not able to AddSingleTon
|
||||
services.AddInstance<IMemoryCache>(new MemoryCache());
|
||||
services.AddSingleton<IMemoryCache, MemoryCache>();
|
||||
});
|
||||
|
||||
//To gracefully shutdown the server - Not for production scenarios
|
||||
|
|
|
|||
|
|
@ -84,8 +84,7 @@ namespace MusicStore
|
|||
services.AddSignalR();
|
||||
|
||||
//Add InMemoryCache
|
||||
//Currently not able to AddSingleTon
|
||||
services.AddInstance<IMemoryCache>(new MemoryCache());
|
||||
services.AddSingleton<IMemoryCache, MemoryCache>();
|
||||
}
|
||||
|
||||
//This method is invoked when KRE_ENV is 'Development' or is not defined
|
||||
|
|
|
|||
|
|
@ -86,8 +86,7 @@ namespace MusicStore
|
|||
services.AddSignalR();
|
||||
|
||||
//Add InMemoryCache
|
||||
//Currently not able to AddSingleTon
|
||||
services.AddInstance<IMemoryCache>(new MemoryCache());
|
||||
services.AddSingleton<IMemoryCache, MemoryCache>();
|
||||
});
|
||||
|
||||
//Configure SignalR
|
||||
|
|
|
|||
Loading…
Reference in New Issue