the source for NHibernate.Cfg.Configuration::ConfigureCaches() hinted at a solution, which was to add the ability to configure cache_region_prefix
this was quite easily done by adding a wrapper to SysCacheProvider:
Code:
public class CacheProvider : ICacheProvider
{
private SysCacheProvider provider = new SysCacheProvider();
public ICache BuildCache( string regionName, IDictionary properties )
{
string prefix = "";
if (properties.Contains("hibernate.cache.prefix")) {
prefix = Convert.ToString(properties["hibernate.cache.prefix"]);
}
regionName = prefix + regionName;
return provider.BuildCache( regionName, properties );
}
public long NextTimestamp()
{
return provider.NextTimestamp();
}
public void Start( IDictionary properties )
{
provider.Start( properties );
}
public void Stop()
{
provider.Stop();
}
}