Skip to content

Commit 7ae0095

Browse files
audiolionmbillow
authored andcommitted
Fix #111 by Adding Cache Invalidation (#113)
1 parent 147f94f commit 7ae0095

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

conditional/util/ldap.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,26 @@ def ldap_is_current_student(account):
9797

9898
def ldap_set_housingpoints(account, housing_points):
9999
account.housingPoints = housing_points
100+
ldap_get_current_students.cache_clear()
101+
ldap_get_member.cache_clear()
100102

101103

102104
def ldap_set_roomnumber(account, room_number):
103105
account.roomNumber = room_number
106+
ldap_get_current_students.cache_clear()
107+
ldap_get_member.cache_clear()
104108

105109

106110
def ldap_set_active(account):
107111
_ldap_add_member_to_group(account, 'active')
112+
ldap_get_active_members.cache_clear()
113+
ldap_get_member.cache_clear()
108114

109115

110116
def ldap_set_inactive(account):
111117
_ldap_remove_member_from_group(account, 'active')
118+
ldap_get_active_members.cache_clear()
119+
ldap_get_member.cache_clear()
112120

113121

114122
def ldap_get_roomnumber(account):

0 commit comments

Comments
 (0)