Revert "Changed caching strategy."

This reverts commit 4407c6d19101140ad430d43ec338b5aacdf5dfc5.
Reverted changes in cacching