mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-04 09:15:33 +00:00
docs: mirror app.example.ini wording in the cache section (#571)
Docs for https://github.com/go-gitea/gitea/pull/39530, which changed the `INTERVAL` description in `app.example.ini`. The cheat sheet's `[cache]` and `[cache.last_commit]` descriptions now copy the ini wording, including its memcache example. Reviewed-on: https://gitea.com/gitea/docs/pulls/571 Reviewed-by: wxiaoguang <[email protected]> Co-authored-by: silverwind <[email protected]>
This commit is contained in:
@@ -896,19 +896,19 @@ In-Reply-To =
|
||||
|
||||
## Cache (`cache`)
|
||||
|
||||
- `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, `twoqueue` or `memcache`. (`twoqueue` represents a size limited LRU cache.)
|
||||
- `INTERVAL`: **60**: Garbage Collection interval (sec), for memory and twoqueue cache only.
|
||||
- `HOST`: **_empty_**: Connection string for `redis` and `memcache`. For `twoqueue` sets configuration for the queue. If left empty while `ADAPTER` is `redis`, it falls back to [redis/CONN_STR](#redis-redis) when that is set.
|
||||
- `ADAPTER`: **memory**: Either `memory`, `redis`, `memcache`, or `twoqueue`.
|
||||
- `INTERVAL`: **60**: For `memory` and `twoqueue`, GC interval in seconds.
|
||||
- `HOST`: **_empty_**: For `redis` and `memcache`, connection host address. For `twoqueue` sets configuration for the queue. If left empty while `ADAPTER` is `redis`, it falls back to [redis/CONN_STR](#redis-redis) when that is set.
|
||||
- Redis: `redis://:[email protected]:6379/0?pool_size=100&idle_timeout=180s` (See [queue/CONN_STR](#queue-queue-and-queue) for information on additional supported connection types)
|
||||
- For a Redis cluster: `redis+cluster://:[email protected]:6379/0?pool_size=100&idle_timeout=180s`
|
||||
- For a Redis sentinel: `redis+sentinel://:macaron@sentinel0:26379,sentinel1:26379,sentinel2:26379/0?pool_size=100&idle_timeout=180s&master_name=mymaster`
|
||||
- Memcache: `127.0.0.1:9090;127.0.0.1:9091`
|
||||
- Memcache: `127.0.0.1:11211`
|
||||
- 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.
|
||||
- `ITEM_TTL`: **16h**: Time to keep items in cache if not used, Setting it to -1 disables caching.
|
||||
- `ITEM_TTL`: **16h**: Time to keep items in cache if not used. Setting it to -1 disables caching.
|
||||
|
||||
## Cache - LastCommitCache settings (`cache.last_commit`)
|
||||
|
||||
- `ITEM_TTL`: **8760h**: Time to keep items in cache if not used, Setting it to -1 disables caching.
|
||||
- `ITEM_TTL`: **8760h**: Time to keep items in cache if not used. Setting it to -1 disables caching.
|
||||
- `COMMITS_COUNT`: **1000**: Only enable the cache when repository's commits count great than.
|
||||
|
||||
## Session (`session`)
|
||||
|
||||
Reference in New Issue
Block a user