Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Fix get_user function in caching documentation.

Sahil Batrac843600d7612
diff --git a/docs/subsystems/caching.md b/docs/subsystems/caching.md
index f0e7475e0f3..497ef3dfdc2 100644
--- a/docs/subsystems/caching.md
+++ b/docs/subsystems/caching.md
@@ -68,8 +68,9 @@ def user_profile_cache_key(email: str, realm: "Realm") -> str:
@cache_with_key(user_profile_cache_key, timeout=3600 * 24 * 7)
def get_user(email: str, realm: Realm) -> UserProfile:
- return UserProfile.objects.select_related().get(
- email__iexact=email.strip(), realm=realm)
+ return UserProfile.objects.select_related("realm", "bot_owner").get(
+ email__iexact=email.strip(), realm=realm
+ )
```
This decorator implements a pretty classic caching paradigm: