Skip to content

Commit

Permalink
Merge pull request #32 from dimbleby/new-release
Browse files Browse the repository at this point in the history
release 8.2.0
  • Loading branch information
dimbleby authored Nov 30, 2023
2 parents 7e28c5f + 4b27545 commit 0820154
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 8.2.0 (30 November 2023)

- c-ares 1.23.0

## 8.1.0 (14 November 2023)

- c-ares 1.22.0
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "c-ares-resolver"
license = "MIT"
version = "8.1.0"
version = "8.2.0"
authors = ["David Hotham"]
description = """
An asynchronous DNS resolver, backed by c-ares.
Expand All @@ -21,8 +21,8 @@ include = [
]

[dependencies]
c-ares = { version = "8.1.0", default-features = false }
c-ares-sys = { version = "8.1.0", default-features = false }
c-ares = { version = "8.2.0", default-features = false }
c-ares-sys = { version = "8.2.0", default-features = false }
futures-channel = "0.3.9"
polling = "3.1.0"

Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ fn main() {
if version >= 0x1_16_00 {
println!("cargo:rustc-cfg=cares1_22");
}

if version >= 0x1_17_00 {
println!("cargo:rustc-cfg=cares1_23");
}
}
}
12 changes: 12 additions & 0 deletions src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ impl Options {
self.inner.set_max_timeout(max_timeout);
self
}

/// Enable the built-in query cache. Will cache queries based on the returned TTL in the DNS
/// message. Only fully successful and NXDOMAIN query results will be cached.
///
/// The provided value is the maximum number of seconds a query result may be cached; this will
/// override a larger TTL in the response message. This must be a non-zero value otherwise the
/// cache will be disabled.
#[cfg(cares1_23)]
pub fn set_query_cache_max_ttl(&mut self, qcache_max_ttl: u32) -> &mut Self {
self.inner.set_query_cache_max_ttl(qcache_max_ttl);
self
}
}

/// An asynchronous DNS resolver, which returns results via callbacks.
Expand Down

0 comments on commit 0820154

Please sign in to comment.