mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 17:42:25 -06:00 
			
		
		
		
	tweak cache size limits
This commit is contained in:
		
					parent
					
						
							
								884afa26e5
							
						
					
				
			
			
				commit
				
					
						24ae7bec49
					
				
			
		
					 1 changed files with 12 additions and 4 deletions
				
			
		
							
								
								
									
										16
									
								
								internal/cache/timeline.go
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								internal/cache/timeline.go
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -38,7 +38,9 @@ type TimelineCaches struct {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *Caches) initHomeTimelines() {
 | 
					func (c *Caches) initHomeTimelines() {
 | 
				
			||||||
	cap := 1000
 | 
						// Per-user cache
 | 
				
			||||||
 | 
						// so use smaller.
 | 
				
			||||||
 | 
						cap := 400
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log.Infof(nil, "cache size = %d", cap)
 | 
						log.Infof(nil, "cache size = %d", cap)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,7 +48,9 @@ func (c *Caches) initHomeTimelines() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *Caches) initListTimelines() {
 | 
					func (c *Caches) initListTimelines() {
 | 
				
			||||||
	cap := 1000
 | 
						// Per-user cache
 | 
				
			||||||
 | 
						// so use smaller.
 | 
				
			||||||
 | 
						cap := 400
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log.Infof(nil, "cache size = %d", cap)
 | 
						log.Infof(nil, "cache size = %d", cap)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,7 +58,9 @@ func (c *Caches) initListTimelines() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *Caches) initPublicTimeline() {
 | 
					func (c *Caches) initPublicTimeline() {
 | 
				
			||||||
	cap := 1000
 | 
						// Global cache so
 | 
				
			||||||
 | 
						// allow larger.
 | 
				
			||||||
 | 
						cap := 800
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log.Infof(nil, "cache size = %d", cap)
 | 
						log.Infof(nil, "cache size = %d", cap)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -62,7 +68,9 @@ func (c *Caches) initPublicTimeline() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *Caches) initLocalTimeline() {
 | 
					func (c *Caches) initLocalTimeline() {
 | 
				
			||||||
	cap := 1000
 | 
						// Global cache so
 | 
				
			||||||
 | 
						// allow larger.
 | 
				
			||||||
 | 
						cap := 800
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log.Infof(nil, "cache size = %d", cap)
 | 
						log.Infof(nil, "cache size = %d", cap)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue