Revert "Adding per-case cache to optimize"

This reverts commit 85a0d1dc5f5d8b11b60c478214c331ad93b5bb3d.