Skip to content

Commit 8228b04

Browse files
Minimize the change
1 parent 3f28ad9 commit 8228b04

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/NHibernate/Cache/StandardQueryCache.cs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,10 @@ public bool Put(
8383
IList result,
8484
ISessionImplementor session)
8585
{
86-
if (queryParameters.NaturalKeyLookup && result.Count == 0)
87-
return false;
88-
89-
var ts = session.Factory.Settings.CacheProvider.NextTimestamp();
90-
91-
Log.Debug("caching query results in region: '{0}'; {1}", _regionName, key);
92-
93-
Cache.Put(key, GetCacheableResult(returnTypes, session, result, ts, GetAutoDiscoveredAliases(key)));
94-
95-
return true;
86+
// 6.0 TODO: inline the call.
87+
#pragma warning disable 612
88+
return Put(key, returnTypes, result, queryParameters.NaturalKeyLookup, session);
89+
#pragma warning restore 612
9690
}
9791

9892
// Since 5.2
@@ -106,7 +100,7 @@ public bool Put(QueryKey key, ICacheAssembler[] returnTypes, IList result, bool
106100

107101
Log.Debug("caching query results in region: '{0}'; {1}", _regionName, key);
108102

109-
Cache.Put(key, GetCacheableResult(returnTypes, session, result, ts, null));
103+
Cache.Put(key, GetCacheableResult(returnTypes, session, result, ts, GetAutoDiscoveredAliases(key)));
110104

111105
return true;
112106
}

0 commit comments

Comments
 (0)