KamoCRM

Skip DB member lookup for messages auth check

PerformanceMediaService
Shipped
12 மார்ச், 2026 அன்று 3:07 AM UTC
Author
Kamo
Commit
c798b27

Extract getMemberIdFromRequest() that reads memberID from the Redis session without hitting the DB. Use it in getMessages() instead of getCurrentMember() — the member entity was only ever null-checked there, never used. Saves one DB round-trip on every chat history load. Refactor getCurrentMember() to delegate to getMemberIdFromRequest() internally to avoid duplicated cookie/session-reading logic.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing