diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-02-02 03:11:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-01 19:11:32 +0000 |
commit | ce7062a422777c00aadf43ad67a90cc8aae689a5 (patch) | |
tree | 1648064ddb7f8d9e5c6b889bed9147db295cb658 /docs | |
parent | 046bb05979b2476d4eef85f2d156ac42310f1a3f (diff) | |
download | gitea-ce7062a422777c00aadf43ad67a90cc8aae689a5.tar.gz gitea-ce7062a422777c00aadf43ad67a90cc8aae689a5.zip |
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
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/doc/advanced/config-cheat-sheet.en-us.md | 7 | ||||
-rw-r--r-- | docs/content/doc/advanced/config-cheat-sheet.zh-cn.md | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/content/doc/advanced/config-cheat-sheet.en-us.md b/docs/content/doc/advanced/config-cheat-sheet.en-us.md index e7b87c5272..7e5b39e480 100644 --- a/docs/content/doc/advanced/config-cheat-sheet.en-us.md +++ b/docs/content/doc/advanced/config-cheat-sheet.en-us.md @@ -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\]. diff --git a/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md b/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md index a095b3bc88..80861f457a 100644 --- a/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md +++ b/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md @@ -148,6 +148,7 @@ menu: ## Cache (`cache`) +- `ENABLED`: **true**: 是否启用。 - `ADAPTER`: **memory**: 缓存引擎,可以为 `memory`, `redis` 或 `memcache`。 - `INTERVAL`: **60**: 只对内存缓存有效,GC间隔,单位秒。 - `HOST`: **\<empty\>**: 针对redis和memcache有效,主机地址和端口。 @@ -155,6 +156,12 @@ menu: - Memache: `127.0.0.1:9090;127.0.0.1:9091` - `ITEM_TTL`: **16h**: 缓存项目失效时间,设置为 0 则禁用缓存。 +## Cache - LastCommitCache settings (`cache.last_commit`) + +- `ENABLED`: **true**: 是否启用。 +- `ITEM_TTL`: **8760h**: 缓存项目失效时间,设置为 0 则禁用缓存。 +- `COMMITS_COUNT`: **1000**: 仅当仓库的提交数大于时才启用缓存。 + ## Session (`session`) - `PROVIDER`: Session 内容存储方式,可选 `memory`, `file`, `redis` 或 `mysql`。 |