Fix caching mechanism.