I need to invalidate cache in a web application when related data is updated in another application (running on the same machine). Both applications use the same database. I know there’s SqlCacheDependency.
How do is it in terms of performance?
Is interprocess communication (e.g. using name pipes) an option in web applications? Does it outperform SqlCacheDependency?
I need to invalidate cache in a web application when related data is updated
Share
This is actually pretty simple to do by just using web services or a page action in each webapp. The web service can just clear a cached element whenever it is called.
When webapp A updates the data that is cached in webapp B, just have webapp A call the web service in webapp B that clears the cache and vice versa. You can add authentication as well if you want to secure it etc.
Anytime I have had to communicate with another web application and perform an action within the context of the other app I have done it by exposing web services or pages (ashx files) that will perform whatever action I need.