♻️ Bazaar stage cache and naming (#17161)

This commit is contained in:
Jeffrey Chen 2026-03-08 15:49:18 +08:00 committed by GitHub
parent 465755e184
commit d127de2e60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 67 additions and 90 deletions

View file

@ -40,7 +40,7 @@ type Funding struct {
}
// Package 描述了集市包元数据和传递给前端的其他信息。
// - 集市包新增元数据字段需要同步修改 bazaar 的工作流,参考 https://github.com/siyuan-note/bazaar/commit/aa36d0003139c52d8e767c6e18a635be006323e2
// - 集市包新增元数据字段需要同步修改 bazaar 的工作流,参考 https://github.com/siyuan-note/bazaar/commit/aa36d0003139c52d8e767c6e18a635be006323e2
type Package struct {
Author string `json:"author"`
URL string `json:"url"`
@ -104,7 +104,7 @@ type StageRepo struct {
type StageIndex struct {
Repos []*StageRepo `json:"repos"`
reposByURL map[string]*StageRepo // 不序列化,首次按 URL 查找时懒构建
reposByURL map[string]*StageRepo // 不序列化,首次按 URL 查找时懒构建,随整份索引一起过期
reposOnce sync.Once
}