In this work, we consider a real-time IoT monitoring system in which an energy harvesting sensor with a finite-size battery measures a physical process and transmits the status updates to an aggregator. The aggregator, equipped with caching capabilities, can serve the external requests of a destination network with either a stored update or a fresh update from the sensor. We assume that the destination network act as a gossiping network in which the update packets are forwarded among the nodes in a randomized setting. We utilize the Markov Decision Process framework to model and optimize the network’s average Version Age of Information (AoI) and obtain the optimal policy at the aggregator. The structure of the optimal policy is analytically demonstrated and numerically verified. Numerical results highlight the effect of the system parameters on the average Version AoI. The simulations reveal the superior performance of the optimal policy compared to a set of baseline policies.