简体   繁体   中英

SharePoint 2010 and ASP.net Cache

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/)

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).

我使用了内存缓存,效果很好:)如预期的那样

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM