mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
Storing a QuerySet rather than the list version of the result in it has a large overhead -- and, as noted by the type annotations, the result is only ever used as a list. This difference is particularly important because the cached `get_realm_user_dicts` can get extremely large for realms with large numbers of users, potentially overflowing the 1MB default object limit in memcached. Switch all cases of `cache_with_key` which return QuerySets to returning the list values of them.