mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-10 20:50:25 +08:00
优化代码
This commit is contained in:
@@ -86,9 +86,6 @@ func MatchBytesCache(regex *re.Regexp, byteSlice []byte, cacheLife CacheLife) bo
|
|||||||
cacheHits.IncreaseHit(regIdString)
|
cacheHits.IncreaseHit(regIdString)
|
||||||
return item.Value == 1
|
return item.Value == 1
|
||||||
}
|
}
|
||||||
if item != nil {
|
|
||||||
return item.Value == 1
|
|
||||||
}
|
|
||||||
var b = regex.Match(byteSlice)
|
var b = regex.Match(byteSlice)
|
||||||
if b {
|
if b {
|
||||||
cache.Write(key, 1, fasttime.Now().Unix()+cacheLife)
|
cache.Write(key, 1, fasttime.Now().Unix()+cacheLife)
|
||||||
|
|||||||
Reference in New Issue
Block a user