将缓存key含*号的截取
This commit is contained in:
1
lib/core/cache/lcoal.go
vendored
1
lib/core/cache/lcoal.go
vendored
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user