remove invalid keys from cache right away