Asp.Net MVC best way to update cached table
Posted
by Eddy Mishiyev
on Stack Overflow
See other posts from Stack Overflow
or by Eddy Mishiyev
Published on 2010-04-19T21:36:15Z
Indexed on
2010/04/19
21:43 UTC
Read the original article
Hit count: 302
There are certain tables that get called often but updated rarely. One of these tables is Departments. So to save DB trips, I think it is ok to cache this table taking into consideration that the table has very small size. However, once you cached it an issue of keeping the table data fresh occurs. So what is the best way to determine that the table is dirty and therefore requires a reload and how that code should be invoked. I look for solution that will be scalable. So updating the cache right after inserting will not work. So if one machine inserted the record all other on network should get notified to reload the cache. I was thinking for calling corresponding web service from T-SQL but don't really like the idea of consuming recourses on sql server. So what are the best practices to resolve this type of problems. Thanks in advance Eddy
© Stack Overflow or respective owner