StoreMeta.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  StoreMeta
 

Typedefs

typedef class StoreMeta tlv
 

Enumerations

enum  {
  STORE_META_VOID,
  STORE_META_KEY_URL,
  STORE_META_KEY_SHA,
  STORE_META_KEY_MD5,
  STORE_META_URL,
  STORE_META_STD,
  STORE_META_HITMETERING,
  STORE_META_VALID,
  STORE_META_VARY_HEADERS,
  STORE_META_STD_LFS,
  STORE_META_OBJSIZE,
  STORE_META_STOREURL,
  STORE_META_VARY_ID,
  STORE_META_END
}
 

Functions

char * storeSwapMetaPack (tlv *tlv_list, int *length)
 
tlvstoreSwapMetaBuild (StoreEntry *e)
 
void storeSwapTLVFree (tlv *n)
 

Typedef Documentation

typedef class StoreMeta tlv

Definition at line 15 of file StoreMeta.h.

Enumeration Type Documentation

anonymous enum
Todo:
AYJ: for critical lists like this we should use A=64,B=65 etc to enforce and reserve values.
Note
NOTE! We must preserve the order of this list!

Store "swap meta" Description

"swap meta" refers to a section of meta data stored at the beginning of an object that is stored on disk. This meta data includes information such as the object's cache key (MD5), URL, and part of the StoreEntry structure.
The meta data is stored using a TYPE-LENGTH-VALUE format. That is, each chunk of meta information consists of a TYPE identifier, a LENGTH field, and then the VALUE (which is LENGTH octets long).
Enumerator
STORE_META_VOID 

Just a placeholder for the zeroth value. It is never used on disk.

STORE_META_KEY_URL 
Deprecated:
This represents the case when we use the URL as the cache key, as Squid-1.1 does. Currently we don't support using a URL as a cache key, so this is not used.
STORE_META_KEY_SHA 
Deprecated:
For a brief time we considered supporting SHA (secure hash algorithm) as a cache key. Nobody liked it, and this type is not currently used.
STORE_META_KEY_MD5 

This represents the MD5 cache key that Squid currently uses. When Squid opens a disk file for reading, it can check that this MD5 matches the MD5 of the user's request. If not, then something went wrong and this is probably the wrong object.

STORE_META_URL 

The object's URL. This also may be matched against a user's request for cache hits to make sure we got the right object.

STORE_META_STD 

This is the "standard metadata" for an object. Really its just this middle chunk of the StoreEntry structure:

time_t timestamp;
time_t lastref;
time_t expires;
time_t lastmod;
uint64_t swap_file_sz;
uint16_t refcount;
uint16_t flags;
STORE_META_HITMETERING 

Reserved for future hit-metering (RFC 2227) stuff

STORE_META_VALID 
Todo:
DOCS: document.
STORE_META_VARY_HEADERS 

Stores Vary request headers

STORE_META_STD_LFS 

Updated version of STORE_META_STD, with support for >2GB objects. As STORE_META_STD except that the swap_file_sz is a 64-bit integer instead of 32-bit.

STORE_META_OBJSIZE 
STORE_META_STOREURL 
STORE_META_VARY_ID 
STORE_META_END 

Definition at line 34 of file StoreMeta.h.

Function Documentation

tlv* storeSwapMetaBuild ( StoreEntry e)

Definition at line 38 of file store_swapmeta.cc.

char* storeSwapMetaPack ( tlv tlv_list,
int length 
)

Definition at line 106 of file store_swapmeta.cc.

References assert, buf, int, NULL, STORE_META_OK, and xmalloc.

Referenced by StoreEntry::getSerialisedMetaData().

void storeSwapTLVFree ( tlv n)

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors