Improved cache mechanism.