⬆️ Upgrade kernel deps

This commit is contained in:
Daniel 2025-04-25 12:21:24 +08:00
parent 3ba3d3e63d
commit 76b876ba3c
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017
5 changed files with 13 additions and 13 deletions

8
kernel/cache/ial.go vendored
View File

@ -23,7 +23,7 @@ import (
"github.com/dgraph-io/ristretto"
)
var docIALCache, _ = ristretto.NewCache[string, map[string]string](&ristretto.Config[string, map[string]string]{
var docIALCache, _ = ristretto.NewCache(&ristretto.Config{
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 {
for k, v := range ial.(map[string]string) {
ret[k] = strings.ReplaceAll(v, editor.IALValEscNewLine, "\n")
}
return
@ -54,7 +54,7 @@ func ClearDocsIAL() {
docIALCache.Clear()
}
var blockIALCache, _ = ristretto.NewCache[string, map[string]string](&ristretto.Config[string, map[string]string]{
var blockIALCache, _ = ristretto.NewCache(&ristretto.Config{
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
return ial.(map[string]string)
}
func RemoveBlockIAL(id string) {

View File

@ -52,13 +52,13 @@ require (
github.com/open-spaced-repetition/go-fsrs/v3 v3.3.1
github.com/panjf2000/ants/v2 v2.11.3
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pdfcpu/pdfcpu v0.9.1
github.com/pdfcpu/pdfcpu v0.10.2
github.com/radovskyb/watcher v1.0.7
github.com/rqlite/sql v0.0.0-20241111133259-a4122fabb196
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/sashabaranov/go-openai v1.38.2
github.com/shirou/gopsutil/v4 v4.25.3
github.com/siyuan-note/dejavu v0.0.0-20250425040734-cf778a44b27b
github.com/siyuan-note/dejavu v0.0.0-20250425041744-41d516f57836
github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97
github.com/siyuan-note/filelock v0.0.0-20250227145141-7d111cdf3c57

View File

@ -377,8 +377,8 @@ github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+D
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8=
github.com/siyuan-note/dejavu v0.0.0-20250425040734-cf778a44b27b h1:Bq0gjcc+L3QRkZcGk2xLwjo13AeTORTLUriP4Gbhw4w=
github.com/siyuan-note/dejavu v0.0.0-20250425040734-cf778a44b27b/go.mod h1:LoravhILz8sW38zPd73xpw//fyJHbKW/gFRGA6U3e3A=
github.com/siyuan-note/dejavu v0.0.0-20250425041744-41d516f57836 h1:utRFKPUkVGkYogO6QVXfDYtHC6QjjJo0Tb1xkjqIGbE=
github.com/siyuan-note/dejavu v0.0.0-20250425041744-41d516f57836/go.mod h1:LoravhILz8sW38zPd73xpw//fyJHbKW/gFRGA6U3e3A=
github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec h1:D8Sjwa+7WxP3XrIBscT4PxBZZddZ83/O+5nX1sq6g6g=
github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec/go.mod h1:6iAxXPOOAG3+M4bCiKQZTQ+n4gSUx/OyHhsP57dJlS8=
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 h1:lM5v8BfNtbOL5jYwhCdMYBcYtr06IYBKjjSLAPMKTM8=

View File

@ -38,7 +38,7 @@ import (
// virtualBlockRefCache 用于保存块关联的虚拟引用关键字。
// 改进打开虚拟引用后加载文档的性能 https://github.com/siyuan-note/siyuan/issues/7378
var virtualBlockRefCache, _ = ristretto.NewCache[string, []string](&ristretto.Config[string, []string]{
var virtualBlockRefCache, _ = ristretto.NewCache(&ristretto.Config{
NumCounters: 102400,
MaxCost: 10240,
BufferItems: 64,
@ -61,7 +61,7 @@ func getBlockVirtualRefKeywords(root *ast.Node) (ret []string) {
ret = putBlockVirtualRefKeywords(content, root)
return
}
ret = val
ret = val.([]string)
return
}
@ -217,7 +217,7 @@ func getVirtualRefKeywords(root *ast.Node) (ret []string) {
}
if val, ok := virtualBlockRefCache.Get("virtual_ref"); ok {
ret = val
ret = val.([]string)
}
if "" != strings.TrimSpace(Conf.Editor.VirtualBlockRefInclude) {

View File

@ -39,7 +39,7 @@ func disableCache() {
cacheDisabled = true
}
var blockCache, _ = ristretto.NewCache[string, *Block](&ristretto.Config[string, *Block]{
var blockCache, _ = ristretto.NewCache(&ristretto.Config{
NumCounters: 102400,
MaxCost: 10240,
BufferItems: 64,
@ -71,7 +71,7 @@ func getBlockCache(id string) (ret *Block) {
b, _ := blockCache.Get(id)
if nil != b {
ret = b
ret = b.(*Block)
}
return
}