I'm presently using Hibernate with MultiTenancy options (schema per tenant in MySQL... so DB per tenant). We have an implementation of the connection provider and tenant identifier which properly switches DB schemas for us. Great.
Now, we want to begin exploring using 2nd Level Cache in our application. Going through the docs, it not clear if this works properly or not.
For a given tenant database, there will be rows with given DB ids... 1,2,3 etc as primary key. When I have two tenant DBs in play, are those entities stored separately? Will Hibernate correctly create caches per tenant (effectively)?