LemonChannels.Adapters.WhatsApp.Dedupe (lemon_channels v0.1.0)

View Source

ETS-backed TTL dedup cache for WhatsApp messages.

Prevents processing duplicate messages within the TTL window.

Summary

Functions

Creates the ETS dedup table. Call once at startup.

Marks {jid, message_id} as seen.

Prunes expired entries if the table exceeds max_entries.

Returns true if {jid, message_id} has been seen and not yet expired.

Functions

init()

Creates the ETS dedup table. Call once at startup.

mark(jid, message_id)

Marks {jid, message_id} as seen.

maybe_prune()

Prunes expired entries if the table exceeds max_entries.

seen?(jid, message_id)

Returns true if {jid, message_id} has been seen and not yet expired.