Refactor #4240: Refactor purgeSharedAnimationCache function to _clear