Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/NHibernate/Impl/SessionFactoryImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings
model.RootClazz.CacheRegionName,
model.CacheConcurrencyStrategy,
model.IsMutable,
model.EntityName,
caches);
var cp = PersisterFactory.CreateClassPersister(model, cache, this, mapping);
entityPersisters[model.EntityName] = cp;
Expand All @@ -290,6 +291,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings
model.CacheRegionName,
model.CacheConcurrencyStrategy,
model.Owner.IsMutable,
model.OwnerEntityName,
caches);
var persister = PersisterFactory.CreateCollectionPersister(model, cache, this);
collectionPersisters[model.Role] = persister;
Expand Down Expand Up @@ -446,10 +448,10 @@ private IQueryCache BuildQueryCache(string queryCacheName)
properties);
}

private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy(
string cacheRegion,
private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy(string cacheRegion,
string strategy,
bool isMutable,
string entityName,
Dictionary<Tuple<string, string>, ICacheConcurrencyStrategy> caches)
{
if (strategy == null || !settings.IsSecondLevelCacheEnabled)
Expand All @@ -462,7 +464,7 @@ private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy(
cache = CacheFactory.CreateCache(strategy, GetCache(cacheRegion), settings);
caches.Add(cacheKey, cache);
if (isMutable && strategy == CacheFactory.ReadOnly)
log.Warn("read-only cache configured for mutable: {0}", name);
log.Warn("read-only cache configured for mutable: {0}", entityName);

return cache;
}
Expand Down