From f41a047f78f3311e23dc4e04f2fc5060f6ee92bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bouc=CC=8Cek?= Date: Thu, 1 Sep 2022 16:37:57 +0200 Subject: [PATCH] Fix: Prevent restore cache on closing connection --- src/Connection.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Connection.php b/src/Connection.php index d562ab6a..538080e9 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -50,9 +50,11 @@ public function expunge(): bool public function close(int $flag = 0): bool { + $stream = $this->resource->getStream(); + $this->resource->clearLastMailboxUsedCache(); - return \imap_close($this->resource->getStream(), $flag); + return \imap_close($stream, $flag); } public function getQuota(string $root = 'INBOX'): array