Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

namesys: add WithMaxCacheTTL #571

Merged
merged 1 commit into from
Jan 26, 2024
Merged

namesys: add WithMaxCacheTTL #571

merged 1 commit into from
Jan 26, 2024

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Jan 25, 2024

Boxo part of #545.

I want to note that this TTL does not apply to DNS ONLY because the DNSResolver does not provide TTL values. It's important to note that the Namesys cache is oblivious regarding which resolver is backing it. In practice, it only caches IPNS records.

Kubo ipfs/kubo#10321

@hacdias hacdias self-assigned this Jan 25, 2024
@hacdias hacdias requested a review from a team as a code owner January 25, 2024 10:39
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bf34cd0) 65.63% compared to head (d95a957) 65.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #571      +/-   ##
==========================================
- Coverage   65.63%   65.57%   -0.06%     
==========================================
  Files         207      207              
  Lines       25593    25605      +12     
==========================================
- Hits        16797    16790       -7     
- Misses       7323     7340      +17     
- Partials     1473     1475       +2     
Files Coverage Δ
namesys/namesys.go 56.31% <100.00%> (+1.18%) ⬆️
namesys/namesys_cache.go 47.91% <100.00%> (+8.89%) ⬆️

... and 13 files with indirect coverage changes

@hacdias hacdias requested a review from lidel January 25, 2024 11:04
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, if this global ceiling overrides DNS-specific DNS.MaxCacheTTL we can clarify that in Kubo docs in ipfs/kubo#10321.

@hacdias
Copy link
Member Author

hacdias commented Jan 26, 2024

lgtm, if this global ceiling overrides DNS-specific DNS.MaxCacheTTL we can clarify that in Kubo docs in ipfs/kubo#10321.

It does not because the DNS Resolver does not return the TTL. So that is fine. If it ever happens to return a TTL - consequently caching the DNSLink entries too in Namesys - we can update the docs.

@hacdias hacdias enabled auto-merge (rebase) January 26, 2024 09:59
@hacdias hacdias merged commit fdfcfcc into main Jan 26, 2024
13 checks passed
@hacdias hacdias deleted the namesys-maxcachettl branch February 20, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants