Using caching in multiple servers

Topics: Caching Application Block
Dec 11, 2010 at 2:18 AM

I am to propose a architecture for implementing caching for a BizTalk solution in a multi-server enviornment. So the requirement is once a file on a share folder is changed, the code in all the servers will automatically pickup the new data. There is no requirement to persist the cached data back to the shared data store.

So is this as easy as on all the servers, have a file dependency on the file resides on the common shared folder, on each server, invalidate the cached data once the file dependancy changed.

Another question is, how does the file dependency work in a multi-server enviornment, does it actually work if i put the file in the shared folder?

Dec 13, 2010 at 8:47 AM

I would think the shared file use for FileDependency will work but shared data store will not. Caches cannot be shared among different application domains. Sharing the backing store will only work with the database store (since the database handles concurrent access), and even then, as noted in the docs, changes to the store do not propagate down to the individual cache managers. Also quoting Chris Tavares on his "Thinking About the Future of Caching Application Block" blog:

"With the upcoming release of the cache-formerly-known-as-Velocity, Microsoft has a quality distributed cache technology available. We’d be nuts to try and replicate all that work.  We did an analysis of the APIs between our CacheManager and the Velocity cache and came to the conclusion that wrapping Velocity in our interface would cost you a huge amount of capability, so we decided the best guidance was “use Velocity” rather than go through the caching block"

Gino Terrado
Global Technologies and Solutions
Avanade, Inc.