Skip to content

Commit 94f4c3e

Browse files
committed
Change the last commit cache default ttl to 8760h
1 parent d3a7362 commit 94f4c3e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

custom/conf/app.ini.sample

+2-2
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,9 @@ ITEM_TTL = 16h
650650
[cache.last_commit]
651651
; if the cache enabled
652652
ENABLED = true
653-
; Time to keep items in cache if not used, default is 16 hours.
653+
; Time to keep items in cache if not used, default is 8760 hours.
654654
; Setting it to 0 disables caching
655-
ITEM_TTL = 16h
655+
ITEM_TTL = 8760h
656656
; Only enable the cache when repository's commits count great than
657657
COMMITS_COUNT = 1000
658658

docs/content/doc/advanced/config-cheat-sheet.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ relation to port exhaustion.
394394
## Cache - LastCommitCache settings (`cache.last_commit`)
395395

396396
- `ENABLED`: **true**: Enable the cache.
397-
- `ITEM_TTL`: **16h**: Time to keep items in cache if not used, Setting it to 0 disables caching.
397+
- `ITEM_TTL`: **8760h**: Time to keep items in cache if not used, Setting it to 0 disables caching.
398398
- `COMMITS_COUNT`: **1000**: Only enable the cache when repository's commits count great than.
399399

400400
## Session (`session`)

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ menu:
159159
## Cache - LastCommitCache settings (`cache.last_commit`)
160160

161161
- `ENABLED`: **true**: 是否启用。
162-
- `ITEM_TTL`: **86400h**: 缓存项目失效时间,设置为 0 则禁用缓存。
162+
- `ITEM_TTL`: **8760h**: 缓存项目失效时间,设置为 0 则禁用缓存。
163163
- `COMMITS_COUNT`: **1000**: 仅当仓库的提交数大于时才启用缓存。
164164

165165
## Session (`session`)

modules/setting/cache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
CommitsCount int64
4444
}{
4545
Enabled: true,
46-
TTL: 16 * time.Hour,
46+
TTL: 8760 * time.Hour,
4747
CommitsCount: 1000,
4848
},
4949
}

0 commit comments

Comments
 (0)