Fix cleanup logic
Keep only cache entries with an expiry in the future.
This commit is contained in:
		
							parent
							
								
									413941f5ac
								
							
						
					
					
						commit
						59a92d0363
					
				@ -31,7 +31,7 @@ class MemoryCache {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private cleanup() {
 | 
					  private cleanup() {
 | 
				
			||||||
    this.cache = this.cache.filter((cache) => cache.expires < (new Date()));
 | 
					    this.cache = this.cache.filter((cache) => cache.expires > (new Date()));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user