FQDN Cache Internals
[FQDN Cache API]

Collaboration diagram for FQDN Cache Internals:

Classes

struct  _fqdn_cache_stats

Defines

#define FQDN_LOW_WATER   90
#define FQDN_HIGH_WATER   95

Functions

static void fqdncacheRelease (fqdncache_entry *)
static fqdncache_entryfqdncache_get (const char *)
static int fqdncacheExpiredEntry (const fqdncache_entry *f)
static fqdncache_entryfqdncacheCreateEntry (const char *name)
static void fqdncacheAddEntry (fqdncache_entry *f)
static void fqdncacheCallback (fqdncache_entry *, int wait)
static int fqdncacheParse (fqdncache_entry *f, const char *inbuf)
static void fqdncacheRegisterWithCacheManager (void)
void fqdnStats (StoreEntry *sentry)
static void fqdncacheLockEntry (fqdncache_entry *f)
static void fqdncacheUnlockEntry (fqdncache_entry *f)
static void fqdncacheFreeEntry (void *data)

Variables

static struct _fqdn_cache_stats FqdncacheStats
static dlink_list lru_list
static hash_tablefqdn_table = NULL
static long fqdncache_low = 180
static long fqdncache_high = 200

Detailed Description

Internally, the execution flow is as follows: On a miss, fqdncache_nbgethostbyaddr() checks whether a request for this name is already pending, and if positive, it creates a new entry using fqdncacheAddEntry(). Then it calls fqdncacheAddPending() to add a request to the queue together with data and handler. Else, ifqdncache_dnsDispatch() is called to directly create a DNS query or to fqdncacheEnqueue() if all no DNS port is free.
fqdncacheCallback() is called regularly to walk down the pending list and call handlers.
LRU clean-up is performed through fqdncache_purgelru() according to the fqdncache_high threshold.

Define Documentation

#define FQDN_HIGH_WATER   95

Definition at line 84 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().

#define FQDN_LOW_WATER   90

Definition at line 81 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().


Function Documentation

static fqdncache_entry * fqdncache_get ( const char *  name  )  [static]
Parameters:
name FQDN hash string.
Return values:
Match for given name

Definition at line 192 of file fqdncache.cc.

References hash_lookup(), and NULL.

Referenced by fqdncache_gethostbyaddr(), fqdncache_nbgethostbyaddr(), and fqdncacheAddEntryFromHosts().

static fqdncache_entry * fqdncacheCreateEntry ( const char *  name  )  [static]
static int fqdncacheExpiredEntry ( const fqdncache_entry f  )  [static]
static void fqdncacheFreeEntry ( void *  data  )  [static]
static void fqdncacheLockEntry ( fqdncache_entry f  )  [static]
static void fqdncacheRegisterWithCacheManager ( void   )  [static]

Definition at line 587 of file fqdncache.cc.

References fqdnStats(), and CacheManager::GetInstance().

Referenced by fqdncache_init().

static void fqdncacheUnlockEntry ( fqdncache_entry f  )  [static]

Variable Documentation

hash_table* fqdn_table = NULL [static]

Definition at line 147 of file fqdncache.cc.

long fqdncache_high = 200 [static]

Definition at line 153 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().

long fqdncache_low = 180 [static]

Definition at line 150 of file fqdncache.cc.

Referenced by fqdncache_init(), fqdncache_purgelru(), and fqdncache_restart().

dlink_list lru_list [static]

Definition at line 127 of file fqdncache.cc.

Referenced by external_acl::add().

Search

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors