Network-on-chip (NoC) has been adopted as fast and efficient communication infrastructures in multi-core system for years. The on-chip routers play an important role in providing communication among cores. However, the routers consume considerable leakage power even if they are not in use. Applying power-gating to on-chip routers is a feasible approach to reduce the leakage power consumption. To take full advantage of router power-gating, we hope that the sleep period of routers can be as longer as possible. We propose a cache indexing algorithm such that accessing cache has the minimal impact on interrupting the sleep of idle routers. Experimental results show that our proposed method increases the sleep time of on-chip routers by 78.9% in average.