remove cache and set a limit to cachedIds