mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
优化
This commit is contained in:
4
pkg/cache/product_rule.go
vendored
4
pkg/cache/product_rule.go
vendored
@@ -11,6 +11,10 @@ func ComputeIfAbsentProductRule(key string, fun func(any) (any, error)) (any, er
|
||||
return ProductCache.ComputeIfAbsent(key, fun)
|
||||
}
|
||||
|
||||
func GetProductRule(key string) (any, bool) {
|
||||
return ProductCache.Get(key)
|
||||
}
|
||||
|
||||
func DelProductRule(key string) {
|
||||
ProductCache.Delete(key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user