This repository was archived by the owner on Apr 26, 2024. It is now read-only.
  
  
  - 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.1k
          Fix have_seen_event cache not being invalidated
          #13863
        
      
          
     Merged
      
      
            MadLittleMods
  merged 13 commits into
  develop
from
madlittlemods/13856-fix-have-seen-events-not-being-invalidated
  
      
      
   
  Sep 27, 2022 
      
    
  
     Merged
                    Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            13 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      a847a35
              
                Fix `have_seen_event` cache not being invalidated
              
              
                MadLittleMods f6393db
              
                Add changelog
              
              
                MadLittleMods f2a5c70
              
                Assert is not None
              
              
                MadLittleMods 1054f91
              
                Merge branch 'develop' into madlittlemods/13856-fix-have-seen-events-…
              
              
                MadLittleMods 2162ab5
              
                Invalidate cache like #13796
              
              
                MadLittleMods 0cdc7bf
              
                Fix `@cachedList` on `_have_seen_events_dict`
              
              
                MadLittleMods 5b9b645
              
                Add test description
              
              
                MadLittleMods 9fb750d
              
                Better changelog
              
              
                MadLittleMods 4fa8f05
              
                Add test to make sure we can actually clear entries just by room_id
              
              
                MadLittleMods b9be6c5
              
                Raise exception so we don't run into this arg mismatch again
              
              
                MadLittleMods f8dc17b
              
                Add test to ensure the safety works
              
              
                MadLittleMods af93b3c
              
                Merge branch 'develop' into madlittlemods/13856-fix-have-seen-events-…
              
              
                MadLittleMods 0d0f54e
              
                Merge branch 'develop' into madlittlemods/13856-fix-have-seen-events-…
              
              
                MadLittleMods File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -223,7 +223,7 @@ def _invalidate_caches_for_event( | |
| # process triggering the invalidation is responsible for clearing any external | ||
| # cached objects. | ||
| self._invalidate_local_get_event_cache(event_id) | ||
| self.have_seen_event.invalidate((room_id, event_id)) | ||
| self.have_seen_event.invalidate(((room_id, event_id),)) | ||
|         
                  MadLittleMods marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved          | ||
|  | ||
| self.get_latest_event_ids_in_room.invalidate((room_id,)) | ||
|  | ||
|  | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.