Skip to content

Commit

Permalink
remove incorrectly implemented (and useless) cache. add correct error
Browse files Browse the repository at this point in the history
check after imap command.
  • Loading branch information
mreitinger committed Aug 18, 2011
1 parent e5ff232 commit 424bd0c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/CiderWebmail/Model/IMAPClient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -548,13 +548,10 @@ sub message_as_string {
$self->select($c, { mailbox => $o->{mailbox} } );

my $message_string = $c->stash->{imapclient}->message_string( $o->{uid} );
$self->_die_on_error($c);
utf8::decode($message_string);

unless($c->stash->{headercache}->get({uid => $o->{uid}, mailbox => $o->{mailbox}, header => '_messagestring'})) {
$c->stash->{headercache}->set({uid => $o->{uid}, mailbox => $o->{mailbox}, header => '_messagestring', data => $message_string});
}

return $c->stash->{headercache}->get({uid => $o->{uid}, mailbox => $o->{mailbox}, header => '_messagestring'});
return $message_string;
}

=head2 delete_messages($c, { mailbox => $mailbox, uid => $uid })
Expand Down

0 comments on commit 424bd0c

Please sign in to comment.