File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
StackExchangeRedis/NHibernate.Caches.StackExchangeRedis Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
- using System . Collections . Generic ;
1
+ using System ;
2
+ using System . Collections . Generic ;
2
3
using NHibernate . Cache ;
3
4
using StackExchange . Redis ;
4
5
@@ -19,6 +20,18 @@ public virtual AbstractRegionStrategy Create(IConnectionMultiplexer connectionMu
19
20
{
20
21
return new FastRegionStrategy ( connectionMultiplexer , configuration , properties ) ;
21
22
}
23
+
24
+ if ( configuration . RegionStrategy == typeof ( FastTwoLayerCacheRegionStrategy ) ||
25
+ configuration . RegionStrategy == typeof ( TwoLayerCacheRegionStrategy ) ||
26
+ configuration . RegionStrategy == typeof ( DistributedLocalCacheRegionStrategy ) )
27
+ {
28
+ throw new CacheException (
29
+ $ "{ configuration . RegionStrategy } is not supported by { GetType ( ) } , register " +
30
+ $ "a custom { typeof ( ICacheRegionStrategyFactory ) } or use a supported one. " +
31
+ $ "{ configuration . RegionStrategy } requires an application provided implementation " +
32
+ $ "of { nameof ( RegionMemoryCacheBase ) } and cannot be directly supported by the " +
33
+ $ "{ nameof ( DefaultCacheRegionStrategyFactory ) } .") ;
34
+ }
22
35
23
36
throw new CacheException (
24
37
$ "{ configuration . RegionStrategy } is not supported by { GetType ( ) } , register " +
You can’t perform that action at this time.
0 commit comments