mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Cache last commit to accelerate the repository directory page visit (#10069)
* Cache last commit to accelerate the repository directory page visit * Default use default cache configuration * add tests for last commit cache * Simplify last commit cache * Revert Enabled back * Change the last commit cache default ttl to 8760h * Fix test
This commit is contained in:
@@ -383,6 +383,7 @@ relation to port exhaustion.
|
||||
|
||||
## Cache (`cache`)
|
||||
|
||||
- `ENABLED`: **true**: Enable the cache.
|
||||
- `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, or `memcache`.
|
||||
- `INTERVAL`: **60**: Garbage Collection interval (sec), for memory cache only.
|
||||
- `HOST`: **\<empty\>**: Connection string for `redis` and `memcache`.
|
||||
@@ -390,6 +391,12 @@ relation to port exhaustion.
|
||||
- Memcache: `127.0.0.1:9090;127.0.0.1:9091`
|
||||
- `ITEM_TTL`: **16h**: Time to keep items in cache if not used, Setting it to 0 disables caching.
|
||||
|
||||
## Cache - LastCommitCache settings (`cache.last_commit`)
|
||||
|
||||
- `ENABLED`: **true**: Enable the cache.
|
||||
- `ITEM_TTL`: **8760h**: Time to keep items in cache if not used, Setting it to 0 disables caching.
|
||||
- `COMMITS_COUNT`: **1000**: Only enable the cache when repository's commits count great than.
|
||||
|
||||
## Session (`session`)
|
||||
|
||||
- `PROVIDER`: **memory**: Session engine provider \[memory, file, redis, mysql, couchbase, memcache, nodb, postgres\].
|
||||
|
Reference in New Issue
Block a user