Skip to content

Commit

Permalink
Merge pull request #5 from xiachufang/ignore
Browse files Browse the repository at this point in the history
异步执行方法不缓存 Ignore 的结果
  • Loading branch information
fjkfwz authored Dec 17, 2021
2 parents 303349f + 98b0b6c commit d31ff87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hacache/hacache.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (hc *HaCache) worker() {
switch e := event.(type) {
case *EventCacheExpired:
data, err := hc.FnRun(true, e.Args...)
if err != nil || (data != nil && data.Err != nil) {
if err != nil || (data != nil && (data.Err != nil || data.Ignore)) {
continue
}
if err := hc.Set(hc.GenCacheKey(e.Args...), data.Val); err != nil {
Expand Down

0 comments on commit d31ff87

Please sign in to comment.