Skip to content

Commit d6a4bf2

Browse files
committed
Make EntitySetFetchQueryCache static
1 parent f86bcfd commit d6a4bf2

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntitySetTask.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
// Created by: Alexander Nikolaev
55
// Created: 2009.09.09
66

7-
using System;
8-
using System.Collections.Generic;
9-
using System.Linq;
10-
using System.Linq.Expressions;
11-
using System.Reflection;
127
using Xtensive.Core;
138
using Xtensive.Orm.Linq;
149
using Xtensive.Orm.Model;
@@ -173,7 +168,7 @@ private QueryTask CreateQueryTask()
173168

174169
var session = manager.Owner.Session;
175170
var scope = new CompiledQueryProcessingScope(null, null, parameterContext, false);
176-
QueryProvider = session.StorageNode.EntitySetFetchQueryCache.GetOrAdd(cacheKey, CreateRecordSetLoadingItems);
171+
QueryProvider = StorageNode.EntitySetFetchQueryCache.GetOrAdd(cacheKey, CreateRecordSetLoadingItems);
177172
if (session.Domain.TagsEnabled && session.Tags != null) {
178173
foreach (var tag in session.Tags) {
179174
QueryProvider = new TagProvider(QueryProvider, tag);

Orm/Xtensive.Orm/Orm/StorageNode.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public sealed class StorageNode : ISessionSource
6161
/// <summary>
6262
/// Caches uncompiled queries used by <see cref="PrefetchManager"/> to fetch <see cref="EntitySet{TItem}"/> content.
6363
/// </summary>
64-
internal ConcurrentDictionary<ItemsQueryCacheKey, CompilableProvider> EntitySetFetchQueryCache { get; } = new();
64+
internal static ConcurrentDictionary<ItemsQueryCacheKey, CompilableProvider> EntitySetFetchQueryCache { get; } = new();
6565

6666
/// <summary>
6767
/// Caches certain info about EntitySet fields, e.g. queries to fetch current count or items.

0 commit comments

Comments
 (0)