Data Structures¶
-
class
OpenDir
¶ An open directory entry. It contains all the information of a
Dir
plus additional information from the firstDoc
.
-
class
CacheVC
¶ A virtual connection class which accepts input for writing to cache.
-
int
CacheVC
::
openReadStartEarliest
(int event, Event *e)¶ Performs the initial read for an alternate of an object.
-
class
HttpTunnel
¶ 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
¶ Holds the data from a line in
cache.config
.
-
class
CacheHTTPInfoVector
¶ Defined in
P_CacheHttp.h
. This is an array ofHTTPInfo
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
¶ 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 (possiblyNULL
) to an instance of the wrapped class.
-
class
HTTPCacheAlt
¶ Defined in
HTTP.h
.This is the metadata for a single alternate for a cached object. It contains, among other data, the following:
- The key for the earliest
Doc
of the alternate. - The request and response headers.
- The fragment offset table.[#fragment-offset-table]_
- Timestamps for request and response from origin server.
- The key for the earliest
-
class
EvacuationBlock
¶ Record for evacuation.
-
class
Vol
¶ This represents a storage unit inside a cache volume.
-
off_t
segments
¶ 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
buckets
¶ 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>
evacuate
¶ Array of of
EvacuationBlock
buckets. This is sized so there is one bucket for every evacuation span.
-
off_t
-
int
Vol
::
evac_range
(off_t low, off_t high, int evac_phase)¶ Start an evacuation if there is any
EvacuationBlock
in the range from low to high. Return0
if no evacuation was started, non-zero otherwise.
-
class
CacheVol
¶ A cache volume as described in
volume.config
.
-
class
Doc
¶ Defined in
P_CacheVol.h
.-
uint32_t
len
¶ The length of this segment including the header length, fragment table, and this structure.
-
uint64_t
total_len
¶ Total length of the entire document not including meta data but including headers.
-
INK_MD5
first_key
¶ First index key in the document (the index key used to locate this object in the volume index).
-
INK_MD5
key
¶ 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.
-
uint8_t
ftype
¶ Fragment type. Currently only
CACHE_FRAG_TYPE_HTTP
is used. Other types may be used for cache extensions if those are ever implemented.
-
uint24_t
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. [1]
-
uint32_t
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. |