Skip to content

Commit ca437e5

Browse files
committed
This reverts commit d282187.
1 parent eac5d66 commit ca437e5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Orm/Xtensive.Orm/Orm/Domain.cs

-5
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,6 @@ public static Domain Demand()
155155
/// </summary>
156156
internal ConcurrentDictionary<(TypeInfo, LockMode, LockBehavior), ExecutableProvider> EntityLockProviderCache { get; } = new();
157157

158-
/// <summary>
159-
/// Caches certain info about EntitySet fields, e.g. queries to fetch current count or items.
160-
/// </summary>
161-
internal ConcurrentDictionary<Xtensive.Orm.Model.FieldInfo, EntitySetTypeState> EntitySetTypeStateCache { get; } = new();
162-
163158
internal object UpgradeContextCookie { get; private set; }
164159

165160
internal SqlConnection SingleConnection { get; private set; }

Orm/Xtensive.Orm/Orm/EntitySetBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ private static Key GetOwnerKey(Persistent owner)
923923
private EntitySetTypeState GetEntitySetTypeState()
924924
{
925925
EnsureOwnerIsNotRemoved();
926-
return Session.Domain.EntitySetTypeStateCache.GetOrAdd(Field, EntitySetTypeStateFactory, this);
926+
return Session.StorageNode.EntitySetTypeStateCache.GetOrAdd(Field, EntitySetTypeStateFactory, this);
927927
}
928928

929929
private static EntitySetTypeState BuildEntitySetTypeState(FieldInfo field, EntitySetBase entitySet)

Orm/Xtensive.Orm/Orm/StorageNode.cs

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ public sealed class StorageNode : ISessionSource
4444
/// </summary>
4545
public TypeIdRegistry TypeIdRegistry { get; private set; }
4646

47+
/// <summary>
48+
/// Caches certain info about EntitySet fields, e.g. queries to fetch current count or items.
49+
/// </summary>
50+
internal ConcurrentDictionary<Xtensive.Orm.Model.FieldInfo, EntitySetTypeState> EntitySetTypeStateCache { get; } = new();
51+
4752
internal ConcurrentDictionary<SequenceInfo, CachingSequence> KeySequencesCache { get; } = new();
4853
internal ConcurrentDictionary<PersistRequestBuilderTask, IReadOnlyList<PreparedPersistRequest>> PersistRequestCache { get; } = new();
4954

0 commit comments

Comments
 (0)