From 66541021c211473e396fc0e77eaf911b2fe11470 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delaporte?=
<12201973+fredericdelaporte@users.noreply.github.com>
Date: Sun, 17 Sep 2023 18:12:03 +0200
Subject: [PATCH] Explicit how to use advanced Redis strategies
---
doc/reference/modules/nhibernate_caches.xml | 32 ++++++++++++++++++---
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/doc/reference/modules/nhibernate_caches.xml b/doc/reference/modules/nhibernate_caches.xml
index 997b5ff1a0b..3b3c1f5c0b7 100644
--- a/doc/reference/modules/nhibernate_caches.xml
+++ b/doc/reference/modules/nhibernate_caches.xml
@@ -818,6 +818,14 @@
Extends NHibernate.Caches.StackExchangeRedis.DefaultRegionStrategy and uses
an additional local memory cache for faster readings. The local caches are invalidated by using Redis pub/sub mechanism.
This strategy should be used only for regions that have few write operations and a high expiration time.
+
+
+ In order to use this strategy a custom ICacheRegionStrategyFactory
+ has to be provided (see cache.region_strategy_factory setting), where the strategy is created with a
+ custom RegionMemoryCacheBase implementation. See the source of
+ NHibernate.Caches.StackExchangeRedis.Tests.CacheRegionStrategyFactory for an example.
+
+
This strategy inherits additional settings from DefaultRegionStrategy and also has its own settings:
cache.region_strategy.two_layer_cache.use_pipelining
@@ -848,7 +856,16 @@
Extends NHibernate.Caches.StackExchangeRedis.FastRegionStrategy and uses
an additional local memory cache for faster readings. The local caches are invalidated by using Redis pub/sub mechanism.
This strategy does not support ICache.Clear operation and should be used only for regions that have
- few write operations and a high expiration time. This strategy has additional settings:
+ few write operations and a high expiration time.
+
+
+ In order to use this strategy a custom ICacheRegionStrategyFactory
+ has to be provided (see cache.region_strategy_factory setting), where the strategy is created with a
+ custom RegionMemoryCacheBase implementation. See the source of
+ NHibernate.Caches.StackExchangeRedis.Tests.CacheRegionStrategyFactory for an example.
+
+
+ This strategy has additional settings:
cache.region_strategy.fast_two_layer_cache.use_pipelining
@@ -880,9 +897,16 @@
operation was performed. When two operations have the same DateTime.Ticks, then the client with the highest
id wins. This strategy should be used only for regions that have few write operations and a high expiration time. It is recommended
to use NHibernate.Caches.StackExchangeRedis.TwoLayerCacheRegionStrategy, when the instances where the strategy
- would run are often restarted/recycled. In order to use this strategy a custom ICacheRegionStrategyFactory
- has to be provided (see cache.region_strategy_factory setting), where the strategy is created with a custom
- RegionMemoryCacheBase implementation. This strategy has additional settings:
+ would run are often restarted/recycled.
+
+
+ In order to use this strategy a custom ICacheRegionStrategyFactory
+ has to be provided (see cache.region_strategy_factory setting), where the strategy is created with a
+ custom RegionMemoryCacheBase implementation. See the source of
+ NHibernate.Caches.StackExchangeRedis.Tests.CacheRegionStrategyFactory for an example.
+
+
+ This strategy has additional settings:
cache.region_strategy.distributed_local_cache.use_pipelining