开发者

One database, two applications, 2nd-level caching and NHibernate

开发者 https://www.devze.com 2022-12-13 19:18 出处:网络
What do I need to know when setting up caching using NHibernate, in the case that I have 开发者_运维问答two applications running on different servers, but only one database. Are table dependencies gen

What do I need to know when setting up caching using NHibernate, in the case that I have 开发者_运维问答two applications running on different servers, but only one database. Are table dependencies generally sufficient to make sure that weird caching problems don't arise? If so, what sort of polltime should I look at?


well in order for nhibernate to check for concurrency issues you can add a field to your entities. That will cause nhibernate to throw a concurrency exception when trying to update an entity that has been modified by someone else.

If you want to use the second level cache with multiple servers I can recommend a distributed implementation of the nhibernate second level cache, for example NCache: http://www.alachisoft.com/ncache/nhibernate_index.html

0

精彩评论

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

关注公众号