mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	perf: fix caching (#8660)
The cache implementation did previously not store the results of the computation and was thus not a cache at all. This can cause a significant number of database queries each time someone with a large number of followers does something that causes an activity to be federated.
This commit is contained in:
		
							parent
							
								
									c5699fae53
								
							
						
					
					
						commit
						89c5fd0931
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -48,6 +48,7 @@ export class Cache<T> {
 | 
			
		|||
 | 
			
		||||
		// Cache MISS
 | 
			
		||||
		const value = await fetcher();
 | 
			
		||||
		this.set(key, value);
 | 
			
		||||
		return value;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue