mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-04 03:03:14 -05:00 
			
		
		
		
	plugin/cache: Reword serve_stale docs for clarity (#5394)
* reword for clarity; use consistent terminology Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
		
							
								
								
									
										12
									
								
								plugin/cache/README.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								plugin/cache/README.md
									
									
									
									
										vendored
									
									
								
							@@ -54,12 +54,12 @@ cache [TTL] [ZONES...] {
 | 
				
			|||||||
  **DURATION** defaults to 1m. Prefetching will happen when the TTL drops below **PERCENTAGE**,
 | 
					  **DURATION** defaults to 1m. Prefetching will happen when the TTL drops below **PERCENTAGE**,
 | 
				
			||||||
  which defaults to `10%`, or latest 1 second before TTL expiration. Values should be in the range `[10%, 90%]`.
 | 
					  which defaults to `10%`, or latest 1 second before TTL expiration. Values should be in the range `[10%, 90%]`.
 | 
				
			||||||
  Note the percent sign is mandatory. **PERCENTAGE** is treated as an `int`.
 | 
					  Note the percent sign is mandatory. **PERCENTAGE** is treated as an `int`.
 | 
				
			||||||
* `serve_stale`, when serve\_stale is set, cache always will serve an expired entry to a client if there is one
 | 
					* `serve_stale`, when serve\_stale is set, cache will always serve an expired entry to a client if there is one
 | 
				
			||||||
  available.  When this happens, cache will attempt to refresh the cache entry after sending the expired cache
 | 
					  available as long as it has not been expired for longer than **DURATION** (default 1 hour). By default, the _cache_ plugin will
 | 
				
			||||||
  entry to the client. The responses have a TTL of 0. **DURATION** is how far back to consider
 | 
					  attempt to refresh the cache entry after sending the expired cache entry to the client. The
 | 
				
			||||||
  stale responses as fresh. The default duration is 1h. **REFRESH_MODE** controls when the attempt to refresh
 | 
					  responses have a TTL of 0. **REFRESH_MODE** controls the timing of the expired cache entry refresh.
 | 
				
			||||||
  the cache happens. `verified` will first verify that an entry is still unavailable from the source before sending
 | 
					  `verified` will first verify that an entry is still unavailable from the source before sending the expired entry to the client.
 | 
				
			||||||
  the stale response to the client. `immediate` will immediately send the expired response to the client before
 | 
					  `immediate` will immediately send the expired entry to the client before
 | 
				
			||||||
  checking to see if the entry is available from the source. **REFRESH_MODE** defaults to `immediate`. Setting this
 | 
					  checking to see if the entry is available from the source. **REFRESH_MODE** defaults to `immediate`. Setting this
 | 
				
			||||||
  value to `verified` can lead to increased latency when serving stale responses, but will prevent stale entries
 | 
					  value to `verified` can lead to increased latency when serving stale responses, but will prevent stale entries
 | 
				
			||||||
  from ever being served if an updated response can be retrieved from the source.
 | 
					  from ever being served if an updated response can be retrieved from the source.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user