Yesterday, we saw that services are singletons that are created once for all and stay in memory as long as the application is open.
This makes our services the best place to store data that can be shared between multiple different components. Such services can use BehaviorSubjects or Signals to cache that data and replay the last value automatically to any new subscriber (component, directive, pipe, service, etc.).
Here is an example using a signal to store a value and expose it in a read-only fashion:
This article compares BehaviorSubjects and Signals to cache a shareable value.