Improved bitmap-caching functionality.