Originally filed as "Improve the memcached concurrency treatment" and narrowed during investigation. The known cause of theMemcached.add returning NOT_STORED on back-to-back-with-same-key calls (extra setKeyValuePairSync invocations in the fetch path) was eliminated by T412326 (closed Resolved).
Remaining scope: add logging when theMemcached.add returns NOT_STORED, so we can monitor whether residual back-to-back same-key races still occur in production.
Acceptance criteria:
- Log entries are emitted when theMemcached.add returns NOT_STORED (at a level appropriate for periodic review, not per-request noise).
- Logs include enough context (cache key, call site) to identify which code paths are still racing.
- After ~2–4 weeks of logging, post a brief comment summarising what production data shows so we can decide whether any further concurrency work is justified.
See DMartin-WMF's 2025-12-09 comment for the diagnostic detail.