mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Only clear cached_routes if there's a route
This commit is contained in:
		
							parent
							
								
									1a8a3c5b1d
								
							
						
					
					
						commit
						4bb56d2376
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -34,10 +34,9 @@ module Kemal | ||||||
| 
 | 
 | ||||||
|       route = @routes.find(lookup_path) |       route = @routes.find(lookup_path) | ||||||
| 
 | 
 | ||||||
|       if route.found? && @cached_routes.size < CACHED_ROUTES_LIMIT |       if route.found? | ||||||
|  |         @cached_routes.clear if @cached_routes.size == CACHED_ROUTES_LIMIT | ||||||
|         @cached_routes[lookup_path] = route |         @cached_routes[lookup_path] = route | ||||||
|       else |  | ||||||
|         @cached_routes.clear |  | ||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|       route |       route | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue