diff options
author | Joas Schilling <coding@schilljs.com> | 2021-07-02 16:38:38 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-07-02 16:54:47 +0300 |
commit | ca8a3516b36beec9c3d5acf5fb577d28236ec366 (patch) | |
tree | d7108a98ab5082c7c59cabd206a0310f14a60a93 /tests | |
parent | 127b54fe57e9c6ea2ba4a19a90bc9531aad3ae7e (diff) |
Use memcache to save the query for unread message count
For a given message id $lastReadMessage we cache the number of messages
that exist past that message, which happen to also be the number of
unread messages, because this is expensive to query per room and user repeatedly
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/Chat/ChatManagerTest.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/php/Chat/ChatManagerTest.php b/tests/php/Chat/ChatManagerTest.php index 3a4396a57..6bf7447ef 100644 --- a/tests/php/Chat/ChatManagerTest.php +++ b/tests/php/Chat/ChatManagerTest.php @@ -321,7 +321,7 @@ class ChatManagerTest extends TestCase { public function testGetUnreadCount() { /** @var Room|MockObject $chat */ $chat = $this->createMock(Room::class); - $chat->expects($this->once()) + $chat->expects($this->atLeastOnce()) ->method('getId') ->willReturn(23); |