discourse/plugins/chat
Martin Brennan 24ec06ff85
FEATURE: Reintroduce better thread reply counter cache (#21197)
This was reverted in 38cebd3ed5.
The issue was that I was using Discourse.redis.delete_prefixed
which does a slow redis KEYS lookup, which is not advised in
production. This commit removes that, and also ensures the periodical
thread count update only happens if threading is enabled.

I changed to use a redis INCR/DECR for reply count
cache. This avoids a round trip to redis to GET the current
count, and also avoids multi-process issues, where
if there's two processes trying to increment at the
same time, they may both receive the same value, add one
to it, then both write the same value back.
Then, it's only n+1 instead of n+2.

This also prevents almost all chat scheduled jobs from
running if chat is disabled, the only one remaining is
the message retention job.
2023-04-24 09:32:04 +10:00
..
app FEATURE: Reintroduce better thread reply counter cache (#21197) 2023-04-24 09:32:04 +10:00
assets FEATURE: Reintroduce better thread reply counter cache (#21197) 2023-04-24 09:32:04 +10:00
config FEATURE: Reintroduce better thread reply counter cache (#21197) 2023-04-24 09:32:04 +10:00
db DEV: Chat thread reply counter cache (#21050) 2023-04-11 15:40:25 +10:00
lib FEATURE: Reintroduce better thread reply counter cache (#21197) 2023-04-24 09:32:04 +10:00
public
spec FEATURE: Reintroduce better thread reply counter cache (#21197) 2023-04-24 09:32:04 +10:00
test/javascripts FIX: relies on native focus behavior in chat emoji picker (#21092) 2023-04-13 20:35:13 +02:00
plugin.rb FEATURE: Auto-remove users without permission from channel (#20344) 2023-03-22 10:19:59 +10:00
README.md DEV: Chat service object initial implementation (#19814) 2023-02-13 13:09:57 +01:00

This plugin is still in active development and may change frequently

Documentation

The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.

For user documentation, see Discourse Chat.

For developer documentation, see Discourse Documentation.