}
} else if reply.Code() == 340 {
cache.MarkInvalid(keys...)
+ cache.Delete(keys...) // deleted EID?
} else {
break
}
e = ep
break
} else {
- // if this is somehow still a miss, then the EID<->AID map broke
- cache.Delete("aid", "by-eid", eid)
ok = false
+
+ // check to see if we looked in the right AID
+ found := false
+ if a != nil {
+ for _, ep := range a.Episodes {
+ if eid == ep.EID {
+ found = true
+ break
+ }
+ }
+ }
+
+ // if found, then it's just that the anime is also stale (offline?)
+ if found {
+ break
+ } else {
+ // otherwise, the EID<->AID map broke
+ cache.Delete("aid", "by-eid", eid)
+ }
}
}
intentMap.Notify(e, keys...)
cache.Set(g, keys...)
} else if reply.Code() == 350 {
cache.MarkInvalid(keys...)
+ cache.Delete(keys...) // deleted group?
}
intentMap.Notify(g, keys...)
cache.Set(g, "gid", gid)
} else if reply.Code() == 350 {
cache.MarkInvalid(keys...)
+ cache.Delete(keys...) // renamed group?
+ cache.Delete(altKeys...)
}
intentMap.Notify(gid, keys...)