  We discuss the generation of a Schr\"odinger cat in a nanocavity created by
the coupling of an electromagnetic mode with an exciton in a quantum dot
considering the dispersive limit of the Jaynes-Cummings model. More than the
generation itself, we focus on the effects of the environment over the bosonic
state in the nanocavity, which has losses simulated by coupling with two
different kind of reservoirs. In the first case, the interaction between the
system with a finite reservoir shows that fragments of different sizes of the
reservoir deliver the same amount of information about the physical system in
the dynamics of the birth and death of the Schr\"odinger cat. The second case
considers a structured reservoir, whose spectral density varies significantly
with frequency. This situation becomes relevant in solid-state devices where
quantum channels are embedded, as memory effects generally cannot be neglected.
Under these circumstances, it is observed that the dynamics can differ
substantially from the Markovian, presenting oscillations related to the
average number of photons. These oscillations influence the information flow
between the system and the environment, evidenced here by the measurement of
non-Markovianity.
