applyEnd removes any entries whose jobID matches the event. Idempotent.
(evt OpCacheEvent)
| 323 | |
| 324 | // applyEnd removes any entries whose jobID matches the event. Idempotent. |
| 325 | func (m *OpCache) applyEnd(evt OpCacheEvent) { |
| 326 | if evt.JobID == "" { |
| 327 | return |
| 328 | } |
| 329 | for _, k := range m.status.Keys() { |
| 330 | if m.status.Get(k) == evt.JobID { |
| 331 | m.status.Delete(k) |
| 332 | m.backendOps.Delete(k) |
| 333 | } |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | func (m *OpCache) Set(key string, value string) { |
| 338 | m.status.Set(key, value) |