mirror of https://github.com/zulip/zulip.git
b140c17441
This commit defines a new function `get_muting_users` which will return a list of IDs of users who have muted a given user. Whenever someone mutes/unmutes a user, the cache will be flushed, and subsequently when that user sends a message, the cache will be populated with the list of people who have muted them (maybe empty). This data is a good candidate for caching because- 1. The function will later be called from the message send codepath, and we try to minimize database queries there. 2. The entries will be pretty tiny. 3. The entries won't churn too much. An average user will send messages much more frequently than get muted/unmuted, and the first time penalty of hitting the db and populating the cache should ideally get amortized by avoiding several DB lookups on subsequent message sends. The actual code to call this function will be written in further commits. |
||
---|---|---|
.. | ||
data_import | ||
lib | ||
management | ||
migrations | ||
openapi | ||
templatetags | ||
tests | ||
tornado | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py |