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