Home / Function/ cache() — netty Function Reference

cache() — netty Function Reference

Architecture documentation for the cache() function in DefaultAuthoritativeDnsServerCache.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5d337b0e_1923_de57_7d54_9d3eaa385aad["cache()"]
  9058d90f_2238_a379_97a2_ac280ac73508["DefaultAuthoritativeDnsServerCache"]
  5d337b0e_1923_de57_7d54_9d3eaa385aad -->|defined in| 9058d90f_2238_a379_97a2_ac280ac73508
  style 5d337b0e_1923_de57_7d54_9d3eaa385aad fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

resolver-dns/src/main/java/io/netty/resolver/dns/DefaultAuthoritativeDnsServerCache.java lines 94–107

    @Override
    public void cache(String hostname, InetSocketAddress address, long originalTtl, EventLoop loop) {
        checkNotNull(hostname, "hostname");
        checkNotNull(address, "address");
        checkNotNull(loop, "loop");

        if (address.getHostString() == null) {
            // We only cache addresses that have also a host string as we will need it later when trying to replace
            // unresolved entries in the cache.
            return;
        }

        resolveCache.cache(hostname, address, Math.max(minTtl, (int) Math.min(maxTtl, originalTtl)), loop);
    }

Subdomains

Frequently Asked Questions

What does cache() do?
cache() is a function in the netty codebase, defined in resolver-dns/src/main/java/io/netty/resolver/dns/DefaultAuthoritativeDnsServerCache.java.
Where is cache() defined?
cache() is defined in resolver-dns/src/main/java/io/netty/resolver/dns/DefaultAuthoritativeDnsServerCache.java at line 94.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free