Skip to content

JDWX DNSQuery Cache ICache

JDW edited this page Jul 17, 2022 · 1 revision

JDWX\DNSQuery\Cache\ICache

The interface for response packet caching.

  • Interface name: ICache
  • Namespace: \JDWX\DNSQuery\Cache
  • This is an interface

Methods

hashRequest

string JDWX\DNSQuery\Cache\ICache::hashRequest(\JDWX\DNSQuery\Packet\RequestPacket i_rsp)

Create cache hash key for a request packet.

  • Visibility: public
  • This method is static.

Arguments

isTypeCacheable

bool JDWX\DNSQuery\Cache\ICache::isTypeCacheable(string i_type)

Determine if an RR type is cacheable by this implementation.

  • Visibility: public
  • This method is static.

Arguments

  • i_type string - The RR type string (e.g. "A" or "OPT")

get

?\JDWX\DNSQuery\Packet\ResponsePacket JDWX\DNSQuery\Cache\ICache::get(string i_key)

Retrieves a cached response packet based on the provided key.

  • Visibility: public

Arguments

  • i_key string - Key to look up in the cache

getEx

\JDWX\DNSQuery\Packet\ResponsePacket JDWX\DNSQuery\Cache\ICache::getEx(string i_key)

Same as get() but throws an exception if the key is not found.

  • Visibility: public

Arguments

  • i_key string - Key to look up in the local cache

has

bool JDWX\DNSQuery\Cache\ICache::has(string i_key)

See if the cache has a given key.

  • Visibility: public

Arguments

  • i_key string - Key to look up in the cache

put

void JDWX\DNSQuery\Cache\ICache::put(string i_key, \JDWX\DNSQuery\Packet\ResponsePacket i_rsp)

Add a new key/response pair to the cache

  • Visibility: public

Arguments

Clone this wiki locally