| 
									
										
										
										
											2024-01-26 10:43:03 -05:00
										 |  |  | #!/usr/bin/env zsh | 
					
						
							| 
									
										
										
										
											2024-02-06 14:03:44 -05:00
										 |  |  | hostname=$(hostname) | 
					
						
							| 
									
										
										
										
											2024-01-26 10:43:03 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | heat() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |        echo "$1" | 
					
						
							|  |  |  |        curl -i -s "$1" | head -1 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | heatURLs=( | 
					
						
							|  |  |  |        '/api/v1/fees/recommended' | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | while true | 
					
						
							|  |  |  | do | 
					
						
							|  |  |  |        echo "starting heat cache cycle..." | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |        for url in $heatURLs | 
					
						
							|  |  |  |        do | 
					
						
							|  |  |  |                heat "https://${hostname}${url}" | 
					
						
							|  |  |  |        done | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |        sleep 0.5 | 
					
						
							|  |  |  | done |