0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-11-21 17:36:59 -05:00

admin: expand on the redis cache adapter

This commit is contained in:
Elias Elwyn 2024-07-13 16:50:29 +10:00
parent 5d725ecdc3
commit 07db480c04
2 changed files with 8 additions and 0 deletions

View file

@ -767,6 +767,7 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
## Cache (`cache`)
- `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, `redis-cluster`, `twoqueue` or `memcache`. (`twoqueue` represents a size limited LRU cache.)
- Refer to the [Recommended Settings](../recommendations/#cacheadapter) for more information about cache adapters.
- `INTERVAL`: **60**: Garbage Collection interval (sec), for memory and twoqueue cache only.
- `HOST`: **\<empty\>**: Connection string for `redis`, `redis-cluster` and `memcache`. For `twoqueue` sets configuration for the queue.
- Redis: `redis://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`

View file

@ -42,6 +42,13 @@ If your instance does not see much activity, it is recommended to change this va
If your instance sees a lot of activity, it is recommended to change this value to **redis** or **memcache**. In that case, caching is outsourced to third-party software designed to cache items. Keep in mind that you will probably also need to modify `[cache].HOST` to configure the use of this software.
The **redis** adapter should support most software that works with a limited subset of the [Redis Go Client](https://github.com/redis/go-redis) APIs. In particular, Forgejo has integration tests against:
- [Redis](https://redis.io/) v7.2; higher versions will not be officially supported due to licensing concerns,
- [Redict](https://redict.io/), a fork of Redis v7.2 licensed under the Lesser GNU General Public license (`LGPL-3.0-only`),
- [Valkey](https://valkey.io/), a fork of Redis v7.2 stewarded by the Linux Foundation, and
- [Garnet](https://microsoft.github.io/garnet), an independently implemented cache-store using [Redis's RESP](https://redis.io/docs/latest/develop/reference/protocol-spec/).
### `[repository.signing].DEFAULT_TRUST_MODEL`
When Forgejo needs to verify a GPG or SSH signed commit on a repository, it checks who it can trust to have a verified commit on that repository. The default value for this setting is that Forgejo trusts only contributors to that repository to have signed commits, this can cause unexpected behavior for those used to GitHub when hosting repositories that anyone can contribute to, because non-collaborators with signed commits on that repository are shown as unverified.