Ah, right. I thought it would be something like that; I didn't know there
was a working impl in uNhAddIns :-)
I copied nhusers because the thread seemed interesting as an example of NH
_usage_.
Diego
On Wed, Dec 15, 2010 at 14:22, Fabio Maulo <[email protected]> wrote:
> I'm doing that programming in C# and thanks to NHibernate good abstraction
> level.
>
> public interface ICacheProvider
> {
> ICache BuildCache(string regionName, IDictionary<string, string>
> properties);
> long NextTimestamp();
> void Start(IDictionary<string, string> properties);
> void Stop();
> }
>
> Can you return a different ICache implementation per region ?
>
> About the QueryCache (in the "example" it use the configured
> ICacheProvider):
>
> http://fabiomaulo.blogspot.com/2009/04/tuning-nhibernate-tolerant-querycache.html
>
> http://nhforge.org/blogs/nhibernate/archive/2009/04/17/tuning-nhibernate-tolerant-querycache.aspx
>
> http://code.google.com/p/unhaddins/source/browse/uNhAddIns/uNhAddIns/Cache/RegionQueryCacheFactory.cs?r=5b0b66196136d721888aa317ac83db6397f9338a
>
> Diego,
> only for my curiosity, why you are coping the nhusers list ?
>
> Thanks.
>
> On Wed, Dec 15, 2010 at 1:58 PM, Diego Mijelshon
> <[email protected]>wrote:
>
>> (copying to users list)
>>
>> How do you do that?
>> There's a single cache.provider_class setting...
>>
>> Diego
>>
>>
>>
>> On Wed, Dec 15, 2010 at 13:04, Fabio Maulo <[email protected]> wrote:
>>
>>> specify a different provider per region is something I'm doing sincen
>>> long time; whichnis teh improv you are talkimg about ?
>>>
>>> --
>>> Fabio Maulo
>>>
>>>
>>> El 15/12/2010, a las 10:52, BaldyOwl <[email protected]> escribió:
>>>
>>> > 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
>>>
>>
>>
>
>
> --
> Fabio Maulo
>
>