Fixed cache clearing failing on APC in certain scenarios