diff options
| author | Matthew Holt <mholt@users.noreply.github.com> | 2021-04-12 15:41:22 -0600 | 
|---|---|---|
| committer | Matthew Holt <mholt@users.noreply.github.com> | 2021-04-12 15:41:22 -0600 | 
| commit | 42b7134ffa3bf3e9e86514c82407979c2627a5ab (patch) | |
| tree | 9e724e9aa3abf4f39e7ecf39c964eed9c7c25648 /modules/caddytls/automation.go | |
| parent | 3903642aa7cf711cb20f27958e7ee5b15fe2bbb3 (diff) | |
caddytls: Configurable storage clean interval
Can drastically reduce costs on storage backends where scans are expensive.
Also reduced default interval to 24h.
See https://github.com/silinternational/certmagic-storage-dynamodb/issues/18
Diffstat (limited to 'modules/caddytls/automation.go')
| -rw-r--r-- | modules/caddytls/automation.go | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/caddytls/automation.go b/modules/caddytls/automation.go index bcc0a0c..6ea92af 100644 --- a/modules/caddytls/automation.go +++ b/modules/caddytls/automation.go @@ -56,6 +56,19 @@ type AutomationConfig struct {  	// performed. Default: 10m  	RenewCheckInterval caddy.Duration `json:"renew_interval,omitempty"` +	// How often to scan storage units for old or expired +	// assets and remove them. These scans exert lots of +	// reads (and list operations) on the storage module, so +	// choose a longer interval for large deployments. +	// Default: 24h +	// +	// Storage will always be cleaned when the process first +	// starts. Then, a new cleaning will be started this +	// duration after the previous cleaning started if the +	// previous cleaning finished in less than half the time +	// of this interval (otherwise next start will be skipped). +	StorageCleanInterval caddy.Duration `json:"storage_clean_interval,omitempty"` +  	defaultPublicAutomationPolicy   *AutomationPolicy  	defaultInternalAutomationPolicy *AutomationPolicy // only initialized if necessary  }  | 
