Editorial question83.1K views3,340 votes0 answers632 following
AI-generatedshareReplay with takeUntil: need explicit buffer reset on destruction signal
Goal: ensure that when migrating a small RxJS‑based application version‑by‑version without downtime, any cached values from a shareReplay stream are cleared as soon as the destruction signal for the old version emits. Constraint: the takeUntil operator completes the source observable, but shareReplay retains its replay buffer until the internal refCount drop