We consider the retransmission of packets inside the network on a segment of an end-to-end path. Using a Markov chain formulation of the problem, we evaluate the effect of the loss probability in the network segment that is responsible for retransmission as well as the ratio between the local RTT and the end-to-end timeout. We also obtain the optimal cache size required for retransmission depending on the packet loss and cache blocking probabilities. Our study reveals that the local RTT of the path segment for retransmission as a function of the end-to-end timeout significantly influences the packet caching time. We also observe that a small increment in the packet loss probability above a threshold can severely affect the percentage of cache filling irrespective of the cache size. Use cases to which our findings apply include a recent IETF proposal called "LOOPS", recursive network architectures and proposals that use hopby-hop retransmissions in special network scenarios, e.g. for Information-Centric Networking (ICN).