forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStandardQueryCacheFactory.cs
38 lines (36 loc) · 1.27 KB
/
StandardQueryCacheFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using NHibernate.Cfg;
namespace NHibernate.Cache
{
/// <summary>
/// Standard Hibernate implementation of the IQueryCacheFactory interface. Returns
/// instances of <see cref="StandardQueryCache" />.
/// </summary>
public class StandardQueryCacheFactory : IQueryCacheFactory
{
// Since v5.3
[Obsolete("Please use overload with a CacheBase parameter.")]
public IQueryCache GetQueryCache(string regionName,
UpdateTimestampsCache updateTimestampsCache,
Settings settings,
IDictionary<string, string> props)
{
return new StandardQueryCache(settings, props, updateTimestampsCache, regionName);
}
/// <summary>
/// Build a query cache.
/// </summary>
/// <param name="updateTimestampsCache">The cache of updates timestamps.</param>
/// <param name="props">The NHibernate settings properties.</param>
/// <param name="regionCache">The <see cref="CacheBase" /> to use for the region.</param>
/// <returns>A query cache.</returns>
public virtual IQueryCache GetQueryCache(
UpdateTimestampsCache updateTimestampsCache,
IDictionary<string, string> props,
CacheBase regionCache)
{
return new StandardQueryCache(updateTimestampsCache, regionCache);
}
}
}