Merge pull request #2399 from bookwyrm-social/cache-fix

Fixes user follow cache
This commit is contained in:
Mouse Reeve 2022-11-17 11:36:20 -08:00 committed by GitHub
commit d40cc21460
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ def get_relationship(context, user_object):
"""caches the relationship between the logged in user and another user""" """caches the relationship between the logged in user and another user"""
user = context["request"].user user = context["request"].user
return get_or_set( return get_or_set(
f"relationship-{user.id}-{user_object.id}", f"cached-relationship-{user.id}-{user_object.id}",
get_relationship_name, get_relationship_name,
user, user,
user_object, user_object,