feat: implement core backend architecture and project management services for the History API
Build and Release / release (push) Successful in 1m33s

This commit is contained in:
2026-06-05 14:18:55 +07:00
parent 420a9ad43a
commit fdcd44cc00
70 changed files with 944 additions and 734 deletions
+22
View File
@@ -0,0 +1,22 @@
package cache
import (
"strconv"
"github.com/cespare/xxhash/v2"
"history-api/pkg/jsonx"
)
func Key(prefix, id string) string {
return prefix + ":" + id
}
func Key2(prefix, first, second string) string {
return prefix + ":" + first + ":" + second
}
func QueryKey(prefix string, params any) string {
data, _ := jsonx.Marshal(params)
return prefix + ":" + strconv.FormatUint(xxhash.Sum64(data), 16)
}