3

I am using multiple databases in a multi-tenant NHibernate application, I was previously using SysCache which worked fine, however I needed to move to Memcache as we are now using a Web Farm. I am actually using Membase server which was very easy to install on windows and supports Memcache.

It appears as if my cache is being shared between session factories...if an entity gets cahced from database A with ID of 1 and application B requests same entity, it should get it from its own database but instead its returning the entity from database A in the cache.

Is there any additional configuration I need to perform to get this to work?

I am using a MembaseCacheProvider from here (and confugured the same too) http://blog.ovesens.net/2011/02/nhibernate-membase-caching-provider/

I have left a comment on the above blog, however I am posting here too in case anyone can help in the meantime.

Paul

Paul Hinett
  • 1,951
  • 2
  • 26
  • 40

1 Answers1

1

You'd better to use different buckets for different applications. See Couchbase Server Data Buckets for more explanations.

Patrick D'Souza
  • 3,491
  • 2
  • 22
  • 39
user688153
  • 51
  • 1
  • How can i specify a different bucket for a different tenant, from what I can see i specify this in the Web.Config file, however my tenants all use the same config file...can I do this in code anywhere? – Paul Hinett Apr 02 '11 at 23:52