val_neg_cache Struct Reference

The negative cache. More...

#include <val_neg.h>

Data Fields

lock_basic_type lock
 the big lock on the negative cache. More...
rbtree_type tree
 The zone rbtree. More...
struct val_neg_datafirst
 the first in linked list of LRU of val_neg_data
struct val_neg_datalast
 last in lru (least recently used element)
size_t use
 current memory in use (bytes)
size_t max
 max memory to use (bytes)
size_t nsec3_max_iter
 max nsec3 iterations allowed
size_t num_neg_cache_noerror
 number of times neg cache records were used to generate NOERROR responses.
size_t num_neg_cache_nxdomain
 number of times neg cache records were used to generate NXDOMAIN responses.

Detailed Description

The negative cache.

It is shared between the threads, so locked. Kept as validator-environ-state. It refers back to the rrset cache for data elements. It can be out of date and contain conflicting data from zone content changes.
It contains a tree of zones, every zone has a tree of data elements. The data elements are part of one big LRU list, with one memory counter.

Field Documentation

◆ lock

lock_basic_type val_neg_cache::lock

the big lock on the negative cache.

Because we use a rbtree for the data (quick lookup), we need a big lock

Referenced by add_item(), check_neg_invariants(), neg_cache_delete(), neg_find_nsec(), remove_item(), set_neg_cache_stats(), val_neg_addreferral(), val_neg_addreply(), val_neg_create(), and val_neg_get_mem().

◆ tree

The documentation for this struct was generated from the following file: