将缓存key含*号的截取

This commit is contained in:
TsMask
2023-09-06 10:46:28 +08:00
parent d782595d8c
commit 7c07d9b803

View File

@@ -27,6 +27,7 @@ func DeleteLocal(key string) {
// 获取指定前缀的所有键
func GetLocalKeys(prefix string) []string {
prefix = strings.TrimSuffix(prefix, "*")
var keys []string
for key := range cNoExpiration.Items() {
if strings.HasPrefix(key, prefix) {