Rework caching integration.
Fix invalid cache error message.