From 82422c06c6ddfb3d5c851afdf6ad3b7163cb9673 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:59:15 +1300 Subject: [PATCH] bust membership cache --- app/activitypub/routes.py | 2 +- app/community/routes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/activitypub/routes.py b/app/activitypub/routes.py index ae856fe6..b36e68fe 100644 --- a/app/activitypub/routes.py +++ b/app/activitypub/routes.py @@ -529,7 +529,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): member = CommunityMember(user_id=user.id, community_id=community.id) db.session.add(member) db.session.commit() - cache.delete_memoized(community_membership, user, community) + cache.delete_memoized('community_membership', user, community) # send accept message to acknowledge the follow accept = { "@context": default_context(), diff --git a/app/community/routes.py b/app/community/routes.py index c4535e96..704e1e32 100644 --- a/app/community/routes.py +++ b/app/community/routes.py @@ -285,7 +285,7 @@ def unsubscribe(actor): db.session.commit() flash('You are unsubscribed from ' + community.title) - cache.delete_memoized(community_membership, current_user, community) + cache.delete_memoized('community_membership', current_user, community) else: # todo: community deletion