From ee47032b058a71292715cbca16899f491c045e6e Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Wed, 3 Dec 2025 14:36:29 +0100 Subject: [PATCH] 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 --- providers/desec/protocol.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/providers/desec/protocol.go b/providers/desec/protocol.go index 5bd9930b1..92e7cae1a 100644 --- a/providers/desec/protocol.go +++ b/providers/desec/protocol.go @@ -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 }