Update MemoryCache DI.
This commit is contained in:
parent
cd9362c92b
commit
390bf8f024
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue