Skip to content

Commit d282187

Browse files
committed
EntitySetTypeStateCache
1 parent 85d7c8c commit d282187

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,6 +155,11 @@ 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+
158163
internal object UpgradeContextCookie { get; private set; }
159164

160165
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.StorageNode.EntitySetTypeStateCache.GetOrAdd(Field, EntitySetTypeStateFactory, this);
926+
return Session.Domain.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,11 +44,6 @@ 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-
5247
internal ConcurrentDictionary<SequenceInfo, CachingSequence> KeySequencesCache { get; } = new();
5348
internal ConcurrentDictionary<PersistRequestBuilderTask, IReadOnlyList<PreparedPersistRequest>> PersistRequestCache { get; } = new();
5449

0 commit comments

Comments
 (0)