[BUGFIX] Mitigate race condition on cache flush