{"action":"created","comment":{"url":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/comments/190775443","pull_request_review_id":123226138,"id":190775443,"diff_hunk":"@@ -35,11 +35,43 @@ impl LruValue {\n }\n \n #[derive(Debug)]\n-pub(crate) struct DnsLru(LruCache<Query, LruValue>);\n+pub(crate) struct DnsLru {\n+    cache: LruCache<Query, LruValue>,\n+    /// An optional minimum TTL value for positive responses.\n+    ///\n+    /// Positive responses with TTLs under `min_positive_ttl` will use\n+    /// `` instead.\n+    min_positive_ttl: Duration,\n+    /// An optional minimum TTL value for negative (`NXDOMAIN`) responses.\n+    ///\n+    /// `NXDOMAIN` responses with TTLs under `min_negative_ttl` will use\n+    /// `min_negative_ttl` instead.\n+    min_negative_ttl: Duration,\n+}\n+\n+#[derive(Copy, Clone, Debug, Default)]\n+pub(crate) struct TtlConfig {","path":"resolver/src/dns_lru.rs","position":20,"original_position":20,"commit_id":"9de5612cc74d53e80635d23ee808b45586f4f420","original_commit_id":"9de5612cc74d53e80635d23ee808b45586f4f420","user":{"login":"bluejekyll","id":986845,"avatar_url":"https://avatars3.githubusercontent.com/u/986845?v=4","gravatar_id":"","url":"https://api.github.com/users/bluejekyll","html_url":"https://github.com/bluejekyll","followers_url":"https://api.github.com/users/bluejekyll/followers","following_url":"https://api.github.com/users/bluejekyll/following{/other_user}","gists_url":"https://api.github.com/users/bluejekyll/gists{/gist_id}","starred_url":"https://api.github.com/users/bluejekyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluejekyll/subscriptions","organizations_url":"https://api.github.com/users/bluejekyll/orgs","repos_url":"https://api.github.com/users/bluejekyll/repos","events_url":"https://api.github.com/users/bluejekyll/events{/privacy}","received_events_url":"https://api.github.com/users/bluejekyll/received_events","type":"User","site_admin":false},"body":"This looks good. I there were discussions of the max TTL as well. Are you planning ot make those changes/?","created_at":"2018-05-25T02:06:13Z","updated_at":"2018-05-25T02:06:13Z","html_url":"https://github.com/bluejekyll/trust-dns/pull/484#discussion_r190775443","pull_request_url":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/484","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/comments/190775443"},"html":{"href":"https://github.com/bluejekyll/trust-dns/pull/484#discussion_r190775443"},"pull_request":{"href":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/484"}}},"pull_request":{"url":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/484","id":189815538,"html_url":"https://github.com/bluejekyll/trust-dns/pull/484","diff_url":"https://github.com/bluejekyll/trust-dns/pull/484.diff","patch_url":"https://github.com/bluejekyll/trust-dns/pull/484.patch","issue_url":"https://api.github.com/repos/bluejekyll/trust-dns/issues/484","number":484,"state":"open","locked":false,"title":"resolver: Add config in ResolverOpts to set an optional minimum TTL for cached records","user":{"login":"hawkw","id":2796466,"avatar_url":"https://avatars1.githubusercontent.com/u/2796466?v=4","gravatar_id":"","url":"https://api.github.com/users/hawkw","html_url":"https://github.com/hawkw","followers_url":"https://api.github.com/users/hawkw/followers","following_url":"https://api.github.com/users/hawkw/following{/other_user}","gists_url":"https://api.github.com/users/hawkw/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkw/subscriptions","organizations_url":"https://api.github.com/users/hawkw/orgs","repos_url":"https://api.github.com/users/hawkw/repos","events_url":"https://api.github.com/users/hawkw/events{/privacy}","received_events_url":"https://api.github.com/users/hawkw/received_events","type":"User","site_admin":false},"body":"This PR adds an optional `cache_min_ttl` field to `ResolverOpts`, which, if \r\nset, will cause the underlying `DnsLru` cache to limit all TTLs to that minimum\r\nvalue. Queries with records whose TTL is under the minimum will have their TTL\r\nset to the minimum value instead. \r\n\r\nWe want the ability to set a minimum TTL for DNS responses in Conduit so as to\r\nlimit the rate at which the Conduit proxy queries DNS in development mode\r\n(see runconduit/conduit#711). I originally implemented this functionality in the\r\nConduit proxy, but @briansmith [suggested](https://github.com/runconduit/conduit/pull/974#pullrequestreview-122330772) that it should be implemented in \r\nTrust-DNS, instead.\r\n\r\nSigned-off-by: Eliza Weisman <eliza@buoyant.io>","created_at":"2018-05-22T23:02:46Z","updated_at":"2018-05-25T02:06:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62934a95d19e0934ba7588887411aa0ce04395e8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/484/commits","review_comments_url":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/484/comments","review_comment_url":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bluejekyll/trust-dns/issues/484/comments","statuses_url":"https://api.github.com/repos/bluejekyll/trust-dns/statuses/9de5612cc74d53e80635d23ee808b45586f4f420","head":{"label":"hawkw:eliza/min-ttls","ref":"eliza/min-ttls","sha":"9de5612cc74d53e80635d23ee808b45586f4f420","user":{"login":"hawkw","id":2796466,"avatar_url":"https://avatars1.githubusercontent.com/u/2796466?v=4","gravatar_id":"","url":"https://api.github.com/users/hawkw","html_url":"https://github.com/hawkw","followers_url":"https://api.github.com/users/hawkw/followers","following_url":"https://api.github.com/users/hawkw/following{/other_user}","gists_url":"https://api.github.com/users/hawkw/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkw/subscriptions","organizations_url":"https://api.github.com/users/hawkw/orgs","repos_url":"https://api.github.com/users/hawkw/repos","events_url":"https://api.github.com/users/hawkw/events{/privacy}","received_events_url":"https://api.github.com/users/hawkw/received_events","type":"User","site_admin":false},"repo":{"id":131767866,"name":"trust-dns","full_name":"hawkw/trust-dns","owner":{"login":"hawkw","id":2796466,"avatar_url":"https://avatars1.githubusercontent.com/u/2796466?v=4","gravatar_id":"","url":"https://api.github.com/users/hawkw","html_url":"https://github.com/hawkw","followers_url":"https://api.github.com/users/hawkw/followers","following_url":"https://api.github.com/users/hawkw/following{/other_user}","gists_url":"https://api.github.com/users/hawkw/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkw/subscriptions","organizations_url":"https://api.github.com/users/hawkw/orgs","repos_url":"https://api.github.com/users/hawkw/repos","events_url":"https://api.github.com/users/hawkw/events{/privacy}","received_events_url":"https://api.github.com/users/hawkw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hawkw/trust-dns","description":"A Rust based DNS client, server, and resolver","fork":true,"url":"https://api.github.com/repos/hawkw/trust-dns","forks_url":"https://api.github.com/repos/hawkw/trust-dns/forks","keys_url":"https://api.github.com/repos/hawkw/trust-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hawkw/trust-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hawkw/trust-dns/teams","hooks_url":"https://api.github.com/repos/hawkw/trust-dns/hooks","issue_events_url":"https://api.github.com/repos/hawkw/trust-dns/issues/events{/number}","events_url":"https://api.github.com/repos/hawkw/trust-dns/events","assignees_url":"https://api.github.com/repos/hawkw/trust-dns/assignees{/user}","branches_url":"https://api.github.com/repos/hawkw/trust-dns/branches{/branch}","tags_url":"https://api.github.com/repos/hawkw/trust-dns/tags","blobs_url":"https://api.github.com/repos/hawkw/trust-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hawkw/trust-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hawkw/trust-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/hawkw/trust-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hawkw/trust-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/hawkw/trust-dns/languages","stargazers_url":"https://api.github.com/repos/hawkw/trust-dns/stargazers","contributors_url":"https://api.github.com/repos/hawkw/trust-dns/contributors","subscribers_url":"https://api.github.com/repos/hawkw/trust-dns/subscribers","subscription_url":"https://api.github.com/repos/hawkw/trust-dns/subscription","commits_url":"https://api.github.com/repos/hawkw/trust-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/hawkw/trust-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/hawkw/trust-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/hawkw/trust-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/hawkw/trust-dns/contents/{+path}","compare_url":"https://api.github.com/repos/hawkw/trust-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hawkw/trust-dns/merges","archive_url":"https://api.github.com/repos/hawkw/trust-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hawkw/trust-dns/downloads","issues_url":"https://api.github.com/repos/hawkw/trust-dns/issues{/number}","pulls_url":"https://api.github.com/repos/hawkw/trust-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/hawkw/trust-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/hawkw/trust-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hawkw/trust-dns/labels{/name}","releases_url":"https://api.github.com/repos/hawkw/trust-dns/releases{/id}","deployments_url":"https://api.github.com/repos/hawkw/trust-dns/deployments","created_at":"2018-05-01T22:04:14Z","updated_at":"2018-05-01T22:04:17Z","pushed_at":"2018-05-25T00:14:34Z","git_url":"git://github.com/hawkw/trust-dns.git","ssh_url":"git@github.com:hawkw/trust-dns.git","clone_url":"https://github.com/hawkw/trust-dns.git","svn_url":"https://github.com/hawkw/trust-dns","homepage":"","size":7492,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bluejekyll:master","ref":"master","sha":"fdb663fb5b3fc3751975376d305e6febbbfc0262","user":{"login":"bluejekyll","id":986845,"avatar_url":"https://avatars3.githubusercontent.com/u/986845?v=4","gravatar_id":"","url":"https://api.github.com/users/bluejekyll","html_url":"https://github.com/bluejekyll","followers_url":"https://api.github.com/users/bluejekyll/followers","following_url":"https://api.github.com/users/bluejekyll/following{/other_user}","gists_url":"https://api.github.com/users/bluejekyll/gists{/gist_id}","starred_url":"https://api.github.com/users/bluejekyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluejekyll/subscriptions","organizations_url":"https://api.github.com/users/bluejekyll/orgs","repos_url":"https://api.github.com/users/bluejekyll/repos","events_url":"https://api.github.com/users/bluejekyll/events{/privacy}","received_events_url":"https://api.github.com/users/bluejekyll/received_events","type":"User","site_admin":false},"repo":{"id":40389144,"name":"trust-dns","full_name":"bluejekyll/trust-dns","owner":{"login":"bluejekyll","id":986845,"avatar_url":"https://avatars3.githubusercontent.com/u/986845?v=4","gravatar_id":"","url":"https://api.github.com/users/bluejekyll","html_url":"https://github.com/bluejekyll","followers_url":"https://api.github.com/users/bluejekyll/followers","following_url":"https://api.github.com/users/bluejekyll/following{/other_user}","gists_url":"https://api.github.com/users/bluejekyll/gists{/gist_id}","starred_url":"https://api.github.com/users/bluejekyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluejekyll/subscriptions","organizations_url":"https://api.github.com/users/bluejekyll/orgs","repos_url":"https://api.github.com/users/bluejekyll/repos","events_url":"https://api.github.com/users/bluejekyll/events{/privacy}","received_events_url":"https://api.github.com/users/bluejekyll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bluejekyll/trust-dns","description":"A Rust based DNS client, server, and resolver","fork":false,"url":"https://api.github.com/repos/bluejekyll/trust-dns","forks_url":"https://api.github.com/repos/bluejekyll/trust-dns/forks","keys_url":"https://api.github.com/repos/bluejekyll/trust-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bluejekyll/trust-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bluejekyll/trust-dns/teams","hooks_url":"https://api.github.com/repos/bluejekyll/trust-dns/hooks","issue_events_url":"https://api.github.com/repos/bluejekyll/trust-dns/issues/events{/number}","events_url":"https://api.github.com/repos/bluejekyll/trust-dns/events","assignees_url":"https://api.github.com/repos/bluejekyll/trust-dns/assignees{/user}","branches_url":"https://api.github.com/repos/bluejekyll/trust-dns/branches{/branch}","tags_url":"https://api.github.com/repos/bluejekyll/trust-dns/tags","blobs_url":"https://api.github.com/repos/bluejekyll/trust-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bluejekyll/trust-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bluejekyll/trust-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/bluejekyll/trust-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bluejekyll/trust-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/bluejekyll/trust-dns/languages","stargazers_url":"https://api.github.com/repos/bluejekyll/trust-dns/stargazers","contributors_url":"https://api.github.com/repos/bluejekyll/trust-dns/contributors","subscribers_url":"https://api.github.com/repos/bluejekyll/trust-dns/subscribers","subscription_url":"https://api.github.com/repos/bluejekyll/trust-dns/subscription","commits_url":"https://api.github.com/repos/bluejekyll/trust-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/bluejekyll/trust-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/bluejekyll/trust-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/bluejekyll/trust-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/bluejekyll/trust-dns/contents/{+path}","compare_url":"https://api.github.com/repos/bluejekyll/trust-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bluejekyll/trust-dns/merges","archive_url":"https://api.github.com/repos/bluejekyll/trust-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bluejekyll/trust-dns/downloads","issues_url":"https://api.github.com/repos/bluejekyll/trust-dns/issues{/number}","pulls_url":"https://api.github.com/repos/bluejekyll/trust-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/bluejekyll/trust-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/bluejekyll/trust-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bluejekyll/trust-dns/labels{/name}","releases_url":"https://api.github.com/repos/bluejekyll/trust-dns/releases{/id}","deployments_url":"https://api.github.com/repos/bluejekyll/trust-dns/deployments","created_at":"2015-08-08T02:47:12Z","updated_at":"2018-05-25T01:59:31Z","pushed_at":"2018-05-25T01:59:28Z","git_url":"git://github.com/bluejekyll/trust-dns.git","ssh_url":"git@github.com:bluejekyll/trust-dns.git","clone_url":"https://github.com/bluejekyll/trust-dns.git","svn_url":"https://github.com/bluejekyll/trust-dns","homepage":"","size":7274,"stargazers_count":817,"watchers_count":817,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":70,"mirror_url":null,"archived":false,"open_issues_count":86,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":70,"open_issues":86,"watchers":817,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/484"},"html":{"href":"https://github.com/bluejekyll/trust-dns/pull/484"},"issue":{"href":"https://api.github.com/repos/bluejekyll/trust-dns/issues/484"},"comments":{"href":"https://api.github.com/repos/bluejekyll/trust-dns/issues/484/comments"},"review_comments":{"href":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/484/comments"},"review_comment":{"href":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bluejekyll/trust-dns/pulls/484/commits"},"statuses":{"href":"https://api.github.com/repos/bluejekyll/trust-dns/statuses/9de5612cc74d53e80635d23ee808b45586f4f420"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bluejekyll"}}