Added synchronized blocks to Bitmap cache operations.