mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
🐛 缓存参数设置不正确 Fix https://github.com/siyuan-note/siyuan/issues/5318
This commit is contained in:
parent
8fccd3a58e
commit
4d4c5b58b9
2 changed files with 7 additions and 9 deletions
8
kernel/cache/ial.go
vendored
8
kernel/cache/ial.go
vendored
|
|
@ -24,8 +24,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var docIALCache, _ = ristretto.NewCache(&ristretto.Config{
|
var docIALCache, _ = ristretto.NewCache(&ristretto.Config{
|
||||||
NumCounters: 100000, // 10W
|
NumCounters: 200000,
|
||||||
MaxCost: 1024 * 1024 * 10, // 10MB
|
MaxCost: 1000 * 1000 * 32,
|
||||||
BufferItems: 64,
|
BufferItems: 64,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -55,8 +55,8 @@ func ClearDocsIAL() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var blockIALCache, _ = ristretto.NewCache(&ristretto.Config{
|
var blockIALCache, _ = ristretto.NewCache(&ristretto.Config{
|
||||||
NumCounters: 100000, // 10W
|
NumCounters: 800000,
|
||||||
MaxCost: 1024 * 1024 * 10, // 10MB
|
MaxCost: 1000 * 1000 * 64,
|
||||||
BufferItems: 64,
|
BufferItems: 64,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var memCache, _ = ristretto.NewCache(&ristretto.Config{
|
var memCache, _ = ristretto.NewCache(&ristretto.Config{
|
||||||
NumCounters: 100000, // 10W
|
NumCounters: 800000,
|
||||||
MaxCost: 1024 * 1024 * 10, // 10MB
|
MaxCost: 1000 * 1000 * 100,
|
||||||
BufferItems: 64,
|
BufferItems: 64,
|
||||||
})
|
})
|
||||||
var disabled = true
|
var disabled = true
|
||||||
|
|
@ -110,9 +110,7 @@ func GetRefsCacheByDefID(defID string) (ret []*Ref) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var defIDRefsCache = gcache.New(30*time.Minute, 5*time.Minute) // [defBlockID]map[refBlockID]*Ref
|
||||||
defIDRefsCache = gcache.New(30*time.Minute, 5*time.Minute) // [defBlockID]map[refBlockID]*Ref
|
|
||||||
)
|
|
||||||
|
|
||||||
func CacheRef(tree *parse.Tree, refIDNode *ast.Node) {
|
func CacheRef(tree *parse.Tree, refIDNode *ast.Node) {
|
||||||
ref := buildRef(tree, refIDNode)
|
ref := buildRef(tree, refIDNode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue