forked from SharpRepository/SharpRepository
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCacheRepository.cs
More file actions
46 lines (40 loc) · 1.83 KB
/
CacheRepository.cs
File metadata and controls
46 lines (40 loc) · 1.83 KB
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
39
40
41
42
43
44
45
46
using SharpRepository.Repository;
using SharpRepository.Repository.Caching;
namespace SharpRepository.CacheRepository
{
public class CacheRepository<T, TKey> : CacheRepositoryBase<T, TKey> where T : class, new()
{
public CacheRepository(string prefix, ICachingProvider cachingProvider, ICachingStrategy<T, TKey> cachingStrategy = null)
: base(prefix, cachingProvider, cachingStrategy)
{
}
}
public class CacheRepository<T> : CacheRepositoryBase<T, int>, IRepository<T> where T : class, new()
{
public CacheRepository(string prefix, ICachingProvider cachingProvider, ICachingStrategy<T, int> cachingStrategy = null)
: base(prefix, cachingProvider, cachingStrategy)
{
}
}
public class CacheCompoundKeyRepository<T> : CacheCompoundKeyRepositoryBase<T> where T : class, new()
{
public CacheCompoundKeyRepository(string prefix, ICachingProvider cachingProvider, ICompoundKeyCachingStrategy<T> cachingStrategy = null)
: base(prefix, cachingProvider, cachingStrategy)
{
}
}
public class CacheRepository<T, TKey, TKey2> : CacheCompoundKeyRepositoryBase<T, TKey, TKey2> where T : class, new()
{
public CacheRepository(string prefix, ICachingProvider cachingProvider, ICompoundKeyCachingStrategy<T, TKey, TKey2> cachingStrategy = null)
: base(prefix, cachingProvider, cachingStrategy)
{
}
}
public class CacheRepository<T, TKey, TKey2, TKey3> : CacheCompoundKeyRepositoryBase<T, TKey, TKey2, TKey3> where T : class, new()
{
public CacheRepository(string prefix, ICachingProvider cachingProvider, ICompoundKeyCachingStrategy<T, TKey, TKey2, TKey3> cachingStrategy = null)
: base(prefix, cachingProvider, cachingStrategy)
{
}
}
}