mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 08:33:43 +00:00
When flushing caches, we want to ensure that even processes which may have a wrong cache-key-prefix know to fetch the latest data from the database. This is complicated by the cache-key-prefixes being stored on disk, and thus checking that every cache delete is not sufficiently performant. We store the list of cache-key-prefixes in the cache, itself, with no prefix. This cache is updated when a new cache-key is written, and is also allowed to lapse after 24 hours. Updating this global cache entry on new prefix creation ensures that even a not-yet-restarted-into deployment will have its caches appropriately purged if changes are made to the underlying data. However, this both adds a cache-get, as well as multiplies the size of all cache clears; for large bulk clears (e.g. for stream renames, which clear the cache for all message-ids in them) this may prove untenable.
This directory contains scripts that:
-
Generally do not require access to Django or the database (those are "management commands"), and thus are suitable to run operationally.
-
Are useful for managing a production deployment of Zulip (many are also used in a Zulip development environment, though development-only scripts live in
tools/).
For more details, see https://zulip.readthedocs.io/en/latest/overview/directory-structure.html.