Fixed the thread looping issue.
Added an error in case of ArrayCache get index mismatch.