Question

I was looking at using data caching with database dependency for a web farmed ASP.Net app. So each web server in the web farm would automatically refresh its Cache value as soon as the database value changes. This would appear to keep all Cache values across the web servers synchronized. Does this sound like a good idea or I am missing something?

Was it helpful?

Solution

No. It does not mean all servers will refresh once the value in the db refreshes, unless you use something like SqlCacheDependency. Take a look @ the following link for that: http://www.asp.net/web-forms/tutorials/data-access/caching-data/using-sql-cache-dependencies-vb

Otherwise the mechanism simply involves looking into the database and taking the value from there. There might be sql jobs which might refresh the value. Hence it is different from above.

Note: for SqlCacheDependency you need to use MSsql 2005+ server.

The other tecnique would be to employ the use of web hooks in your solution...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top