Tweak cache constructor
Merge pull request #2582 from monarchdodra/cacheBug

Tweak cache constructor