开发者

NHibernate 2nd Level Cache

I am developing a Windows Client-Server application. The Server is running as a Windows Service and all Clients connect to 开发者_C百科it with WCF. The Server uses NHibernate 3 for DataAccess. I am now looking to enable 2nd Level Caching for NHibernate. Now I am looking which CacheProvider I should use for this. Can somebody give me a tip about this? Perhaps with a link to a tutorial for installation/configuration? Thank you.

Best Regards, Thomas


If the server is single instance the SysCache2 implementation is production ready. This is built on the ASP.NET cache and provides excellent performance.

If you are running multiple server instances you will need a distributed cache manager and you will need to plan your caching strategies much more carefully. The AppFabric Cache (formerly Velocity) can be used. We are currently evaluating this one ourselves and have found a number of issues we are still trying to resolve. Alternately there are commercial offerings such as NCache which may be worth looking at as well though I'm not sure if it's available for NH3 yet.


In response to what Phil has mentioned about Ncache. It is NH3 ready and provides for minimal code changes to start using it as an L2 cache for Nhibernate. It is available for free download and you can read about using it as an L2 cache here:

http://www.alachisoft.com/ncache/nhibernate-l2cache-index.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜