mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -04:00 
			
		
		
		
	middleware/file: don't reload zone when SOA isn't changed (#707)
* middleware/file: don't reload zone when SOA isn't changed Give Parse an extra argument which is the SOA's serial, if > 0 we check against the just parsed SOA and then just return. Most notable use is in reload.go which is both used in the file and auto middleware. Fixes #415 * PR comments
This commit is contained in:
		| @@ -81,7 +81,7 @@ func fileParse(c *caddy.Controller) (Zones, error) { | ||||
|  | ||||
| 			for i := range origins { | ||||
| 				origins[i] = middleware.Host(origins[i]).Normalize() | ||||
| 				zone, err := Parse(reader, origins[i], fileName) | ||||
| 				zone, err := Parse(reader, origins[i], fileName, 0) | ||||
| 				if err == nil { | ||||
| 					z[origins[i]] = zone | ||||
| 				} else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user