1
votes

We have a web farm of 4 SharePoint 2010 server. As web1, web2, web3, web4 and its AAM is http://xxx.sharepoint.com. Now I am making a web part where some data is going to be cached by HttpContext.Current.Cache. Now as we know that ASP.NET cache is limited to server memory and it is not shared between other servers in the web farm, So I created a solution where I will go to each server and in web.config I will fill the server list in the farm with semicolon separated and whenever any thing add to the cache I will send data to the other server and sync the cache and do the same for cache items removed.

Now my problem is how I will call other server individually by its own name in the SharePoint farm.

    For example (http://web1/)
3

3 Answers

0
votes

Not a direct answer but you can use timer jobs on Sharepoint for implementing something on all servers. Note that Sharepoint timer service must be running on all servers and it does not happen real-time(it doesn't take long either).

0
votes

I used memcache, which is working good :) as expected

0
votes

Microsoft Velocity is perfect use case for your scenario. Velocity will provide you distributed and in-memory cache.

Link: Build Better Data-Driven Apps With Distributed Caching