Good idea, BaldyOwl. I am a big fan of improving the NH cache; that's what I've been working on for the past few months.
You could put all entities with read-only cache concurrency in an in-process cache, because they will not be changing. The trade-off is that each client instance has to load up their in-process cache, vs. memcached where all instances share one cache. Aaron On Wed, Dec 15, 2010 at 6:54 AM, BaldyOwl <[email protected]> wrote: > Hi, > > One of the things that has struck me as somewhat restrictive with > NHibernate is the fact that you can only have one level 2 cache. I've > been looking into how easy it would be to provide support for multiple > level 2 caches. This would allow things such as having an in-process > level 2 cache, such as ASP.NET, for frequently accessed static data, > in addition to an external level 2 cache, such as memcached, for less > frequently accessed and possibly dynamic data. > > I've now actually got something up and running whereby you can specify > a different cache provider for each cache region in hibernate.cfg.xml > and it seems to work pretty well. > > Is this something that others would be interested in? Would it > improve NHibernate if this became 'standard' ? > > Cheers, > Andy
