mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-09 13:46:07 +08:00
DESEC: populate zone cache after creating zone (#3332)
Hi @D3luxee! While reviewing all the `ZoneCreator` implementations, I noticed that the DESEC provider has an incomplete caching implementation for zones. The provider is populating the cache once on first access. Any zones that are created will not be readable in the same life-cycle of dnscontrol. This PR is populating the zone cache after creating a zone. Would you mind giving this a try and let me know how it goes? Thanks! Part of https://github.com/StackExchange/dnscontrol/issues/3007
This commit is contained in:
parent
d1765b6f58
commit
ee47032b05
1 changed files with 5 additions and 0 deletions
|
|
@ -268,6 +268,11 @@ func (c *desecProvider) createDomain(domain string) error {
|
|||
printer.Printf(" %s\n", d)
|
||||
}
|
||||
}
|
||||
c.domainIndexLock.Lock()
|
||||
defer c.domainIndexLock.Unlock()
|
||||
if c.domainIndex != nil {
|
||||
c.domainIndex[domain] = dm.MinimumTTL
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue