Home / Function/ cache() — netty Function Reference

cache() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  827c41b3_0841_4a5b_8441_f3c6c5c4672f["cache()"]
  843d703e_e49f_c265_d13f_8db336d5ec36["Cache"]
  827c41b3_0841_4a5b_8441_f3c6c5c4672f -->|defined in| 843d703e_e49f_c265_d13f_8db336d5ec36
  c0b89246_8ba9_ca82_e4a0_93b63e2ddcb9["get()"]
  827c41b3_0841_4a5b_8441_f3c6c5c4672f -->|calls| c0b89246_8ba9_ca82_e4a0_93b63e2ddcb9
  388be597_f6bf_76c5_5fa0_16e8d63ce694["Entries()"]
  827c41b3_0841_4a5b_8441_f3c6c5c4672f -->|calls| 388be597_f6bf_76c5_5fa0_16e8d63ce694
  a3a06bb5_0cc7_b138_7d64_44cab8d3dafc["add()"]
  827c41b3_0841_4a5b_8441_f3c6c5c4672f -->|calls| a3a06bb5_0cc7_b138_7d64_44cab8d3dafc
  style 827c41b3_0841_4a5b_8441_f3c6c5c4672f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

resolver-dns/src/main/java/io/netty/resolver/dns/Cache.java lines 124–134

    final void cache(String hostname, E value, int ttl, EventLoop loop) {
        Entries entries = resolveCache.get(hostname);
        if (entries == null) {
            entries = new Entries(hostname);
            Entries oldEntries = resolveCache.putIfAbsent(hostname, entries);
            if (oldEntries != null) {
                entries = oldEntries;
            }
        }
        entries.add(value, ttl, 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/Cache.java.
Where is cache() defined?
cache() is defined in resolver-dns/src/main/java/io/netty/resolver/dns/Cache.java at line 124.
What does cache() call?
cache() calls 3 function(s): Entries, add, get.

Analyze Your Own Codebase

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

Try Supermodel Free