The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CachedQuery Class Reference

Cached item stored in the query cache. More...

#include <dns.h>

Inheritance diagram for CachedQuery:

Inheritance graph
[legend]
Collaboration diagram for CachedQuery:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CachedQuery (const std::string &res, unsigned int ttl)
 Build a cached query.
int CalcTTLRemaining ()
 Returns the number of seconds remaining before this cache item has expired and should be removed.

Public Attributes

std::string data
 The cached result data, an IP or hostname.
time_t expires
 The time when the item is due to expire.

Detailed Description

Cached item stored in the query cache.

Definition at line 75 of file dns.h.


Constructor & Destructor Documentation

CachedQuery::CachedQuery const std::string res,
unsigned int  ttl
[inline]
 

Build a cached query.

Parameters:
res The result data, an IP or hostname
ttl The time-to-live value of the query result

Definition at line 89 of file dns.h.


Member Function Documentation

int CachedQuery::CalcTTLRemaining  )  [inline]
 

Returns the number of seconds remaining before this cache item has expired and should be removed.

Definition at line 97 of file dns.h.

Referenced by Resolver::Resolver().


Member Data Documentation

std::string CachedQuery::data
 

The cached result data, an IP or hostname.

Definition at line 80 of file dns.h.

Referenced by Resolver::TriggerCachedResult().

time_t CachedQuery::expires
 

The time when the item is due to expire.

Definition at line 83 of file dns.h.


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