Design patterns·Wiring: injection, containers and lifetimes
the same registration served one shared instance in one place and a new one per request in another, and that was configuration.
Lifetime scope
Also calledlifetime, scope, instance scope, transient vs singleton
The rule a container uses to decide when to reuse an instance and when to build a fresh one: process-wide, per request or operation, or new every time. It is where most container bugs actually live, because the wrong choice is not a crash — it is state visible across requests, or a connection created per call. Choosing it is a design decision about shared mutable state and should be made deliberately, not defaulted.