Skip to content

Commit 166ea25

Browse files
committed
Minor EFCache fix
1 parent 5ae43eb commit 166ea25

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/Libraries/SmartStore.Data/Caching/EfCachingPolicy.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
using System.Collections.Generic;
33
using System.Collections.ObjectModel;
44
using System.Data.Entity.Core.Metadata.Edm;
5-
using System.Diagnostics;
65
using System.Linq;
7-
using System.Text;
86
using EFCache;
97
using SmartStore.Core.Domain.Catalog;
108
using SmartStore.Core.Domain.Customers;
@@ -70,7 +68,7 @@ internal class EfCachingPolicy : CachingPolicy
7068
protected override bool CanBeCached(ReadOnlyCollection<EntitySetBase> affectedEntitySets, string sql, IEnumerable<KeyValuePair<string, object>> parameters)
7169
{
7270
var entitySets = affectedEntitySets.Select(x => x.Name);
73-
var result = entitySets.Any(x => _cacheableSets.Contains(x));
71+
var result = entitySets.All(x => _cacheableSets.Contains(x));
7472
return result;
7573
}
7674

0 commit comments

Comments
 (0)