Invalidate the cache for an event if it is redacted

This commit is contained in:
Mark Haines 2015-02-11 15:23:28 +00:00
parent aff892ce79
commit ddc25cf4e2

View File

@ -423,6 +423,8 @@ class DataStore(RoomMemberStore, RoomStore,
) )
def _store_redaction(self, txn, event): def _store_redaction(self, txn, event):
# invalidate the cache for the redacted event
self._get_event_cache.pop(event.redacts)
txn.execute( txn.execute(
"INSERT OR IGNORE INTO redactions " "INSERT OR IGNORE INTO redactions "
"(event_id, redacts) VALUES (?,?)", "(event_id, redacts) VALUES (?,?)",