Added event listener to reset the caches.