Skip to content

ChatStorage: memoize messages, add find_previous_from

Mark Chao requested to merge 430975-cached-messages into master

What does this MR do and why?

Updates ChatStorage & ChatMessage before implementing !138153 (merged).

  • Memoize ChatStorage#messages, since there is a need to access them a few times during the same request.
  • Implement ChatStorage#find_previous_from for finding particular previous message
  • Implement ChatMessage#== (which compares only id since ChatMessage is an entity)

Existing functionality are not affected.

Note: This will be easier to review commit by commit.

How to set up and validate locally

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #430975

Edited by Mark Chao

Merge request reports

Loading