mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 02:12:24 -05:00 
			
		
		
		
	update the total ratios calculation to include ALL caches (previously was missing a few!) (#2907)
This commit is contained in:
		
					parent
					
						
							
								3554991444
							
						
					
				
			
			
				commit
				
					
						f456bd3401
					
				
			
		
					 2 changed files with 10 additions and 4 deletions
				
			
		
							
								
								
									
										6
									
								
								internal/cache/db.go
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								internal/cache/db.go
									
										
									
									
										vendored
									
									
								
							|  | @ -148,15 +148,15 @@ type GTSCaches struct { | ||||||
| 	// Tag provides access to the gtsmodel Tag database cache. | 	// Tag provides access to the gtsmodel Tag database cache. | ||||||
| 	Tag StructCache[*gtsmodel.Tag] | 	Tag StructCache[*gtsmodel.Tag] | ||||||
| 
 | 
 | ||||||
|  | 	// ThreadMute provides access to the gtsmodel ThreadMute database cache. | ||||||
|  | 	ThreadMute StructCache[*gtsmodel.ThreadMute] | ||||||
|  | 
 | ||||||
| 	// Token provides access to the gtsmodel Token database cache. | 	// Token provides access to the gtsmodel Token database cache. | ||||||
| 	Token StructCache[*gtsmodel.Token] | 	Token StructCache[*gtsmodel.Token] | ||||||
| 
 | 
 | ||||||
| 	// Tombstone provides access to the gtsmodel Tombstone database cache. | 	// Tombstone provides access to the gtsmodel Tombstone database cache. | ||||||
| 	Tombstone StructCache[*gtsmodel.Tombstone] | 	Tombstone StructCache[*gtsmodel.Tombstone] | ||||||
| 
 | 
 | ||||||
| 	// ThreadMute provides access to the gtsmodel ThreadMute database cache. |  | ||||||
| 	ThreadMute StructCache[*gtsmodel.ThreadMute] |  | ||||||
| 
 |  | ||||||
| 	// User provides access to the gtsmodel User database cache. | 	// User provides access to the gtsmodel User database cache. | ||||||
| 	User StructCache[*gtsmodel.User] | 	User StructCache[*gtsmodel.User] | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										8
									
								
								internal/cache/size.go
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								internal/cache/size.go
									
										
									
									
										vendored
									
									
								
							|  | @ -172,6 +172,8 @@ func totalOfRatios() float64 { | ||||||
| 	return 0 + | 	return 0 + | ||||||
| 		config.GetCacheAccountMemRatio() + | 		config.GetCacheAccountMemRatio() + | ||||||
| 		config.GetCacheAccountNoteMemRatio() + | 		config.GetCacheAccountNoteMemRatio() + | ||||||
|  | 		config.GetCacheAccountSettingsMemRatio() + | ||||||
|  | 		config.GetCacheAccountStatsMemRatio() + | ||||||
| 		config.GetCacheApplicationMemRatio() + | 		config.GetCacheApplicationMemRatio() + | ||||||
| 		config.GetCacheBlockMemRatio() + | 		config.GetCacheBlockMemRatio() + | ||||||
| 		config.GetCacheBlockIDsMemRatio() + | 		config.GetCacheBlockIDsMemRatio() + | ||||||
|  | @ -179,17 +181,21 @@ func totalOfRatios() float64 { | ||||||
| 		config.GetCacheClientMemRatio() + | 		config.GetCacheClientMemRatio() + | ||||||
| 		config.GetCacheEmojiMemRatio() + | 		config.GetCacheEmojiMemRatio() + | ||||||
| 		config.GetCacheEmojiCategoryMemRatio() + | 		config.GetCacheEmojiCategoryMemRatio() + | ||||||
|  | 		config.GetCacheFilterMemRatio() + | ||||||
|  | 		config.GetCacheFilterKeywordMemRatio() + | ||||||
|  | 		config.GetCacheFilterStatusMemRatio() + | ||||||
| 		config.GetCacheFollowMemRatio() + | 		config.GetCacheFollowMemRatio() + | ||||||
| 		config.GetCacheFollowIDsMemRatio() + | 		config.GetCacheFollowIDsMemRatio() + | ||||||
| 		config.GetCacheFollowRequestMemRatio() + | 		config.GetCacheFollowRequestMemRatio() + | ||||||
| 		config.GetCacheFollowRequestIDsMemRatio() + | 		config.GetCacheFollowRequestIDsMemRatio() + | ||||||
| 		config.GetCacheInReplyToIDsMemRatio() + |  | ||||||
| 		config.GetCacheInstanceMemRatio() + | 		config.GetCacheInstanceMemRatio() + | ||||||
|  | 		config.GetCacheInReplyToIDsMemRatio() + | ||||||
| 		config.GetCacheListMemRatio() + | 		config.GetCacheListMemRatio() + | ||||||
| 		config.GetCacheListEntryMemRatio() + | 		config.GetCacheListEntryMemRatio() + | ||||||
| 		config.GetCacheMarkerMemRatio() + | 		config.GetCacheMarkerMemRatio() + | ||||||
| 		config.GetCacheMediaMemRatio() + | 		config.GetCacheMediaMemRatio() + | ||||||
| 		config.GetCacheMentionMemRatio() + | 		config.GetCacheMentionMemRatio() + | ||||||
|  | 		config.GetCacheMoveMemRatio() + | ||||||
| 		config.GetCacheNotificationMemRatio() + | 		config.GetCacheNotificationMemRatio() + | ||||||
| 		config.GetCachePollMemRatio() + | 		config.GetCachePollMemRatio() + | ||||||
| 		config.GetCachePollVoteMemRatio() + | 		config.GetCachePollVoteMemRatio() + | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue