Cache Data Structures

class OpenDir P_CacheDir.h line 286

An open directory entry. It contains all the information of a Dir plus additional information from the first Doc.

class CacheVC P_CacheInternal.h line 237

A virtual connection class which accepts input for writing to cache.

int CacheVC::openReadStartHead(int event, Event* e) P_CacheInternal.h line 306

Do the initial read for a cached object.

int CacheVC::openReadStartEarliest(int event, Event* e) P_CacheInternal.h line 302

Do the initial read for an alternate of an object.

class HttpTunnel HttpTunnel.h line 280

Data transfer driver. This contains a set of producers. Each producer is connected to one or more consumers. The tunnel handles events and buffers so that data moves from producers to consumers. The data, as much as possible, is kept in reference counted buffers so that copies are done only when the data is modified or for sources (which acquire data from outside Traffic Server) and sinks (which move data to outside Traffic Server).

class CacheControlResult CacheControl.h line 66

Holds the data from a line in cache.config.

class CacheHTTPInfoVector P_CacheHttp.h line 59

Defined in P_CacheHttp.h. This is an array of HTTPInfo objects and serves as the respository of information about alternates of an object. It is marshaled as part of the metadata for an object in the cache.

class HTTPInfo HTTP.h line 1348

Defined in HTTP.h.

This class is a wrapper for HTTPCacheAlt. It provides the external API for accessing data in the wrapped class. It contains only a pointer (possibly NULL) to an instance of the wrapped class.

class CacheHTTPInfo P_CacheHttp.h line 48

A typedef for HTTPInfo.

class HTTPCacheAlt HTTP.h line 1293

Defined in HTTP.h.

This is the metadata for a single alternate for a cached object. In contains among other data

  • The key for the earliest Doc of the alternate.
  • The request and response headers.
  • The fragment offset table. [1]
  • Timestamps for request and response from origin server.
class EvacuationBlock P_CacheVol.h line 132

Record for evacuation.

class Vol P_CacheVol.h line 418

This represents a storage unit inside a cache volume.

off_t Vol::segments P_CacheVol.h line 428

The number of segments in the volume. This will be roughly the total number of entries divided by the number of entries in a segment. It will be rounded up to cover all entries.

off_t Vol::buckets MT_hashtable.h line 187

The number of buckets in the volume. This will be roughly the number of entries in a segment divided by DIR_DEPTH. For currently defined values this is around 16,384 (2^16 / 4). Buckets are used as the targets of the index hash.

DLL<EvacuationBlock> Vol::evacuate P_CacheVol.h line 452

Array of of EvacuationBlock buckets. This is sized so there is one bucket for every evacuation span.

off_t len P_CacheDisk.h line 94

Length of stripe in bytes.

int Vol::evac_range(off_t low, off_t high, int evac_phase) P_CacheVol.h line 572

Start an evacuation if there is any EvacuationBlock in the range from low to high. Return 0 if no evacuation was started, non-zero otherwise.

class CacheVol P_CacheVol.h line 608

A cache volume as described in volume.config.

class Doc P_CacheVol.h line 627

Defined in P_CacheVol.h.

uint32_t Doc::magic InkAPITest.cc line 6883

Validity check value. Set to DOC_MAGIC for a valid document.

uint32_t Doc::len P_CacheDisk.h line 94

The length of this segment including the header length, fragment table, and this structure.

uint64_t Doc::total_len HashSip.h line 49

Total length of the entire document not including meta data but including headers.

INK_MD5 Doc::first_key P_CacheInternal.h line 390

First index key in the document (the index key used to locate this object in the volume index).

INK_MD5 Doc::key ink_args.h line 43

The index key for this fragment. Fragment keys are computationally chained so that the key for the next and previous fragments can be computed from this key.

uint32_t Doc::hlen P_CacheVol.h line 633

Document header (metadata) length. This is not the length of the HTTP headers.

uint8_t Doc::ftype

Fragment type. Currently only CACHE_FRAG_TYPE_HTTP is used. Other types may be used for cache extensions if those are ever used / implemented.

uint24_t Doc::flen

Fragment table length, if any. Only the first Doc in an object should contain a fragment table.

The fragment table is a list of offsets relative to the HTTP content (not counting metadata or HTTP headers). Each offset is the byte offset of the first byte in the fragment. The first element in the table is the second fragment (what would be index 1 for an array). The offset for the first fragment is of course always zero and so not stored. The purpose of this is to enable a fast seek for range requests - given the first Doc the fragment containing the first byte in the range can be computed and loaded directly without further disk access.

Removed as of version 3.3.0.

uint32_t Doc::sync_serial P_CacheVol.h line 638

Unknown.

uint32_t Doc::write_serial P_CacheInternal.h line 437

Unknown.

uint32_t pinned P_CacheVol.h line 640

Flag and timer for pinned objects.

uint32_t checksum P_CacheVol.h line 641

Unknown. (A checksum of some sort)

class VolHeaderFooter P_CacheVol.h line 102

Footnotes

[1]Changed in version 3.2.0. This previously resided in the first Doc but that caused different alternates to share the same fragment table.