private function save_icache()
    {
        // Save current message from internal cache
        if ($message = $this->icache['__message']) {
            // clean up some object's data
            $this->message_object_prepare($message['object']);

            // calculate current md5 sum
            $md5sum = md5(serialize($message['object']));

            if ($message['md5sum'] != $md5sum) {
                $this->add_message($message['mailbox'], $message['object'], !$message['exists']);
            }

            $this->icache['__message']['md5sum'] = $md5sum;
        }
    }