Skip to content

Commit f135cb7

Browse files
authored
Don't have redis-cluster as possible cache/session adapter in docs (#30794)
This is because it doesn't exist as an adapter. The `redis` adapter already handles Redis cluster configurations. Fixes #30534.
1 parent 6709e28 commit f135cb7

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

custom/conf/app.example.ini

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ LEVEL = Info
14561456
;; Batch size to send for batched queues
14571457
;BATCH_LENGTH = 20
14581458
;;
1459-
;; Connection string for redis queues this will store the redis or redis-cluster connection string.
1459+
;; Connection string for redis queues this will store the redis (or Redis cluster) connection string.
14601460
;; When `TYPE` is `persistable-channel`, this provides a directory for the underlying leveldb
14611461
;; or additional options of the form `leveldb://path/to/db?option=value&....`, and will override `DATADIR`.
14621462
;CONN_STR = "redis://127.0.0.1:6379/0"
@@ -1740,9 +1740,8 @@ LEVEL = Info
17401740
;; For "memory" only, GC interval in seconds, default is 60
17411741
;INTERVAL = 60
17421742
;;
1743-
;; For "redis", "redis-cluster" and "memcache", connection host address
1744-
;; redis: `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
1745-
;; redis-cluster: `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
1743+
;; For "redis" and "memcache", connection host address
1744+
;; redis: `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` (or `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` for a Redis cluster)
17461745
;; memcache: `127.0.0.1:11211`
17471746
;; twoqueue: `{"size":50000,"recent_ratio":0.25,"ghost_ratio":0.5}` or `50000`
17481747
;HOST =
@@ -1772,15 +1771,14 @@ LEVEL = Info
17721771
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17731772
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17741773
;;
1775-
;; Either "memory", "file", "redis", "redis-cluster", "db", "mysql", "couchbase", "memcache" or "postgres"
1774+
;; Either "memory", "file", "redis", "db", "mysql", "couchbase", "memcache" or "postgres"
17761775
;; Default is "memory". "db" will reuse the configuration in [database]
17771776
;PROVIDER = memory
17781777
;;
17791778
;; Provider config options
17801779
;; memory: doesn't have any config yet
17811780
;; file: session file path, e.g. `data/sessions`
1782-
;; redis: `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
1783-
;; redis-cluster: `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
1781+
;; redis: `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` (or `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` for a Redis cluster)
17841782
;; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
17851783
;PROVIDER_CONFIG = data/sessions ; Relative paths will be made absolute against _`AppWorkPath`_.
17861784
;;

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ Configuration at `[queue]` will set defaults for queues with overrides for indiv
492492
- `DATADIR`: **queues/common**: Base DataDir for storing level queues. `DATADIR` for individual queues can be set in `queue.name` sections. Relative paths will be made absolute against `%(APP_DATA_PATH)s`.
493493
- `LENGTH`: **100000**: Maximal queue size before channel queues block
494494
- `BATCH_LENGTH`: **20**: Batch data before passing to the handler
495-
- `CONN_STR`: **redis://127.0.0.1:6379/0**: Connection string for the redis queue type. For `redis-cluster` use `redis+cluster://127.0.0.1:6379/0`. Options can be set using query params. Similarly, LevelDB options can also be set using: **leveldb://relative/path?option=value** or **leveldb:///absolute/path?option=value**, and will override `DATADIR`
495+
- `CONN_STR`: **redis://127.0.0.1:6379/0**: Connection string for the redis queue type. If you're running a Redis cluster, use `redis+cluster://127.0.0.1:6379/0`. Options can be set using query params. Similarly, LevelDB options can also be set using: **leveldb://relative/path?option=value** or **leveldb:///absolute/path?option=value**, and will override `DATADIR`
496496
- `QUEUE_NAME`: **_queue**: The suffix for default redis and disk queue name. Individual queues will default to **`name`**`QUEUE_NAME` but can be overridden in the specific `queue.name` section.
497497
- `SET_NAME`: **_unique**: The suffix that will be added to the default redis and disk queue `set` name for unique queues. Individual queues will default to **`name`**`QUEUE_NAME`_`SET_NAME`_ but can be overridden in the specific `queue.name` section.
498498
- `MAX_WORKERS`: **(dynamic)**: Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
@@ -777,11 +777,11 @@ and
777777

778778
## Cache (`cache`)
779779

780-
- `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, `redis-cluster`, `twoqueue` or `memcache`. (`twoqueue` represents a size limited LRU cache.)
780+
- `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, `twoqueue` or `memcache`. (`twoqueue` represents a size limited LRU cache.)
781781
- `INTERVAL`: **60**: Garbage Collection interval (sec), for memory and twoqueue cache only.
782-
- `HOST`: **_empty_**: Connection string for `redis`, `redis-cluster` and `memcache`. For `twoqueue` sets configuration for the queue.
782+
- `HOST`: **_empty_**: Connection string for `redis` and `memcache`. For `twoqueue` sets configuration for the queue.
783783
- Redis: `redis://:[email protected]:6379/0?pool_size=100&idle_timeout=180s`
784-
- Redis-cluster `redis+cluster://:[email protected]:6379/0?pool_size=100&idle_timeout=180s`
784+
- For a Redis cluster: `redis+cluster://:[email protected]:6379/0?pool_size=100&idle_timeout=180s`
785785
- Memcache: `127.0.0.1:9090;127.0.0.1:9091`
786786
- TwoQueue LRU cache: `{"size":50000,"recent_ratio":0.25,"ghost_ratio":0.5}` or `50000` representing the maximum number of objects stored in the cache.
787787
- `ITEM_TTL`: **16h**: Time to keep items in cache if not used, Setting it to -1 disables caching.
@@ -793,7 +793,7 @@ and
793793

794794
## Session (`session`)
795795

796-
- `PROVIDER`: **memory**: Session engine provider \[memory, file, redis, redis-cluster, db, mysql, couchbase, memcache, postgres\]. Setting `db` will reuse the configuration in `[database]`
796+
- `PROVIDER`: **memory**: Session engine provider \[memory, file, redis, db, mysql, couchbase, memcache, postgres\]. Setting `db` will reuse the configuration in `[database]`
797797
- `PROVIDER_CONFIG`: **data/sessions**: For file, the root path; for db, empty (database config will be used); for others, the connection string. Relative paths will be made absolute against _`AppWorkPath`_.
798798
- `COOKIE_SECURE`:**_empty_**: `true` or `false`. Enable this to force using HTTPS for all session access. If not set, it defaults to `true` if the ROOT_URL is an HTTPS URL.
799799
- `COOKIE_NAME`: **i\_like\_gitea**: The name of the cookie used for the session ID.

0 commit comments

Comments
 (0)