mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
⬆️ Upgrade kernel deps
This commit is contained in:
parent
0aaa4299d7
commit
c765bcc36f
5 changed files with 12 additions and 12 deletions
8
kernel/cache/ial.go
vendored
8
kernel/cache/ial.go
vendored
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/dgraph-io/ristretto"
|
||||
)
|
||||
|
||||
var docIALCache, _ = ristretto.NewCache(&ristretto.Config{
|
||||
var docIALCache, _ = ristretto.NewCache[string, map[string]string](&ristretto.Config[string, map[string]string]{
|
||||
NumCounters: 1024 * 100,
|
||||
MaxCost: 1024 * 1024 * 200,
|
||||
BufferItems: 64,
|
||||
|
|
@ -40,7 +40,7 @@ func GetDocIAL(p string) (ret map[string]string) {
|
|||
}
|
||||
|
||||
ret = map[string]string{}
|
||||
for k, v := range ial.(map[string]string) {
|
||||
for k, v := range ial {
|
||||
ret[k] = strings.ReplaceAll(v, editor.IALValEscNewLine, "\n")
|
||||
}
|
||||
return
|
||||
|
|
@ -54,7 +54,7 @@ func ClearDocsIAL() {
|
|||
docIALCache.Clear()
|
||||
}
|
||||
|
||||
var blockIALCache, _ = ristretto.NewCache(&ristretto.Config{
|
||||
var blockIALCache, _ = ristretto.NewCache[string, map[string]string](&ristretto.Config[string, map[string]string]{
|
||||
NumCounters: 1024 * 1000,
|
||||
MaxCost: 1024 * 1024 * 200,
|
||||
BufferItems: 64,
|
||||
|
|
@ -69,7 +69,7 @@ func GetBlockIAL(id string) (ret map[string]string) {
|
|||
if nil == ial {
|
||||
return
|
||||
}
|
||||
return ial.(map[string]string)
|
||||
return ial
|
||||
}
|
||||
|
||||
func RemoveBlockIAL(id string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue