Cache table with Entity Framework Core

asp.net-core-1.0 asp.net-core-mvc entity-framework-core

Question

I have a database (SQL Server for your information but I don't think it's very important) with some tables, and a ASP.NET Core web application who implements Entity Framework Core to manage data.

In my database, I have 4 tables who are very often used and joined to almost each requests, and the data in this tables are very rarely updated, si I would like to put them in cache to not fetch data in database each time, but only for this tables.

How can I do that with Entity Framework Core ?

I read the documentation but I didn't found anything about caching : https://docs.efproject.net/en/latest

1
3
10/25/2016 12:31:32 PM

Popular Answer

You can use StackExchange.Redis cache for that.You just need to store your tables data on it and invalidate it when tables will be updated.That is it.

Here is the Link : StackExchange.Redis

1
10/25/2016 1:43:09 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow