优化代码

This commit is contained in:
GoEdgeLab
2023-12-05 16:28:10 +08:00
parent cadac28975
commit 3d61f1a110

View File

@@ -86,9 +86,6 @@ func MatchBytesCache(regex *re.Regexp, byteSlice []byte, cacheLife CacheLife) bo
cacheHits.IncreaseHit(regIdString)
return item.Value == 1
}
if item != nil {
return item.Value == 1
}
var b = regex.Match(byteSlice)
if b {
cache.Write(key, 1, fasttime.Now().Unix()+cacheLife)