BUG: not clearing the cache when reindexing issue when partial setting (GH5424)

closes #5424