Make the caching more efficient in one case and actually work in another.