avoid cleaning cache and unregistering listeners too soon