Skip to content

Conversation

@alamin-mahamud
Copy link
Contributor

The cache configuration struct had mismatched default values where TTL fields were holding size defaults and size fields were holding TTL defaults. This caused incorrect behavior when loading configuration via YAML defaults.

What’s Changed

  • Updated default values across all cache fields:
RequestersCacheTTL / RequestersCacheSize
DomainsCacheTTL / DomainsCacheSize
NoErrorDomainsCacheTTL / NoErrorDomainsCacheSize
ServfailDomainsCacheTTL / ServfailDomainsCacheSize
NXDomainsCacheTTL / NXDomainsCacheSize
DefaultDomainsCacheTTL / DefaultDomainsCacheSize
  • Ensures TTL fields now represent TTL defaults and Size fields represent size defaults.

Testing

I did not test it.

…elds

The default values for several cache TTL and size configuration fields were
incorrectly swapped. This commit adjusts the struct tags so that TTL fields
contain TTL defaults and Size fields contain size defaults.
@dmachard
Copy link
Owner

Thanks for the fix
Before merging, could you please run gofmt to fix the formatting issue and add at least a minimal test to avoid regression in future?

@dmachard dmachard merged commit a23c6a3 into dmachard:main Dec 22, 2025
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants