Apache HTTPD
Modules | Classes | Macros | Typedefs | Enumerations | Functions

Modules

 Cache Functions
 
 Cache Storage Functions
 
 Cache Utility Functions
 

Classes

struct  cache_info
 
struct  cache_object
 
struct  cache_handle
 
struct  cache_provider
 
struct  cache_LINK_cache_status_t
 

Macros

#define CACHE_DECLARE(type)   type
 
#define CACHE_DECLARE_NONSTD(type)   type
 
#define CACHE_DECLARE_DATA
 
#define CACHE_PROVIDER_GROUP   "cache"
 
#define AP_CACHE_HIT_ENV   "cache-hit"
 
#define AP_CACHE_REVALIDATE_ENV   "cache-revalidate"
 
#define AP_CACHE_MISS_ENV   "cache-miss"
 
#define AP_CACHE_INVALIDATE_ENV   "cache-invalidate"
 
#define AP_CACHE_STATUS_ENV   "cache-status"
 

Typedefs

typedef struct cache_info cache_info
 
typedef struct cache_object cache_object_t
 
typedef struct cache_handle cache_handle_t
 
typedef int cache_HOOK_cache_status_t(cache_handle_t *h, request_rec *r, apr_table_t *headers, ap_cache_status_e status, const char *reason)
 
typedef struct cache_LINK_cache_status_t cache_LINK_cache_status_t
 
typedef apr_status_t() apr_OFN_ap_cache_generate_key_t(request_rec *r, apr_pool_t *p, const char **key)
 

Enumerations

enum  ap_cache_status_e { AP_CACHE_HIT , AP_CACHE_REVALIDATE , AP_CACHE_MISS , AP_CACHE_INVALIDATE }
 

Functions

apr_time_t ap_cache_current_age (cache_info *info, const apr_time_t age_value, apr_time_t now)
 
apr_time_t ap_cache_hex2usec (const char *x)
 
void ap_cache_usec2hex (apr_time_t j, char *y)
 
charap_cache_generate_name (apr_pool_t *p, int dirlevels, int dirlength, const char *name)
 
const charap_cache_tokstr (apr_pool_t *p, const char *list, const char **str)
 
apr_table_tap_cache_cacheable_headers (apr_pool_t *pool, apr_table_t *t, server_rec *s)
 
apr_table_tap_cache_cacheable_headers_in (request_rec *r)
 
apr_table_tap_cache_cacheable_headers_out (request_rec *r)
 
int ap_cache_control (request_rec *r, cache_control_t *cc, const char *cc_header, const char *pragma_header, apr_table_t *headers)
 
void cache_hook_cache_status (cache_HOOK_cache_status_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int cache_run_cache_status (cache_handle_t *h, request_rec *r, apr_table_t *headers, ap_cache_status_e status, const char *reason)
 
apr_array_header_tcache_hook_get_cache_status (void)
 

Detailed Description

Macro Definition Documentation

◆ AP_CACHE_HIT_ENV

#define AP_CACHE_HIT_ENV   "cache-hit"

Definition at line 122 of file mod_cache.h.

◆ AP_CACHE_INVALIDATE_ENV

#define AP_CACHE_INVALIDATE_ENV   "cache-invalidate"

Definition at line 125 of file mod_cache.h.

◆ AP_CACHE_MISS_ENV

#define AP_CACHE_MISS_ENV   "cache-miss"

Definition at line 124 of file mod_cache.h.

◆ AP_CACHE_REVALIDATE_ENV

#define AP_CACHE_REVALIDATE_ENV   "cache-revalidate"

Definition at line 123 of file mod_cache.h.

◆ AP_CACHE_STATUS_ENV

#define AP_CACHE_STATUS_ENV   "cache-status"

Definition at line 126 of file mod_cache.h.

◆ CACHE_DECLARE

#define CACHE_DECLARE (   type)    type

Definition at line 40 of file mod_cache.h.

◆ CACHE_DECLARE_DATA

#define CACHE_DECLARE_DATA

Definition at line 42 of file mod_cache.h.

◆ CACHE_DECLARE_NONSTD

#define CACHE_DECLARE_NONSTD (   type)    type

Definition at line 41 of file mod_cache.h.

◆ CACHE_PROVIDER_GROUP

#define CACHE_PROVIDER_GROUP   "cache"

Definition at line 97 of file mod_cache.h.

Typedef Documentation

◆ apr_OFN_ap_cache_generate_key_t

typedef apr_status_t() apr_OFN_ap_cache_generate_key_t(request_rec *r, apr_pool_t *p, const char **key)

Definition at line 188 of file mod_cache.h.

◆ cache_handle_t

Definition at line 90 of file mod_cache.h.

◆ cache_HOOK_cache_status_t

Cache status hook. This hook is called as soon as the cache has made a decision as to whether an entity should be served from cache (hit), should be served from cache after a successful validation (revalidate), or served from the backend and potentially cached (miss).

A basic implementation of this hook exists in mod_cache which writes this information to the subprocess environment, and optionally to request headers. Further implementations may add hooks as appropriate to perform more advanced processing, or to store statistics about the cache behaviour.

Definition at line 184 of file mod_cache.h.

◆ cache_info

Definition at line 58 of file mod_cache.h.

◆ cache_LINK_cache_status_t

◆ cache_object_t

Definition at line 81 of file mod_cache.h.

Enumeration Type Documentation

◆ ap_cache_status_e

Enumerator
AP_CACHE_HIT 
AP_CACHE_REVALIDATE 
AP_CACHE_MISS 
AP_CACHE_INVALIDATE 

Definition at line 115 of file mod_cache.h.

Function Documentation

◆ ap_cache_cacheable_headers()

apr_table_t * ap_cache_cacheable_headers ( apr_pool_t pool,
apr_table_t t,
server_rec s 
)

Definition at line 1194 of file cache_util.c.

◆ ap_cache_cacheable_headers_in()

apr_table_t * ap_cache_cacheable_headers_in ( request_rec r)

Definition at line 1242 of file cache_util.c.

◆ ap_cache_cacheable_headers_out()

apr_table_t * ap_cache_cacheable_headers_out ( request_rec r)

Definition at line 1252 of file cache_util.c.

◆ ap_cache_control()

int ap_cache_control ( request_rec r,
cache_control_t cc,
const char cc_header,
const char pragma_header,
apr_table_t headers 
)

Parse the Cache-Control and Pragma headers in one go, marking which tokens appear within the header. Populate the structure passed in.

Definition at line 1002 of file cache_util.c.

◆ ap_cache_current_age()

apr_time_t ap_cache_current_age ( cache_info info,
const apr_time_t  age_value,
apr_time_t  now 
)

Definition at line 232 of file cache_util.c.

◆ ap_cache_generate_name()

char * ap_cache_generate_name ( apr_pool_t p,
int  dirlevels,
int  dirlength,
const char name 
)

Definition at line 917 of file cache_util.c.

◆ ap_cache_hex2usec()

apr_time_t ap_cache_hex2usec ( const char x)

Definition at line 840 of file cache_util.c.

◆ ap_cache_tokstr()

const char * ap_cache_tokstr ( apr_pool_t p,
const char list,
const char **  str 
)

Definition at line 809 of file cache_util.c.

◆ ap_cache_usec2hex()

void ap_cache_usec2hex ( apr_time_t  j,
char y 
)

Definition at line 860 of file cache_util.c.

◆ cache_hook_cache_status()

void cache_hook_cache_status ( cache_HOOK_cache_status_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

Definition at line 2717 of file mod_cache.c.

◆ cache_hook_get_cache_status()

apr_array_header_t * cache_hook_get_cache_status ( void  )

Definition at line 2717 of file mod_cache.c.

◆ cache_run_cache_status()

int cache_run_cache_status ( cache_handle_t h,
request_rec r,
apr_table_t headers,
ap_cache_status_e  status,
const char reason 
)

< Module has handled this stage.

< Module has handled this stage.

< Module declines to handle

< Module has handled this stage.

Definition at line 2717 of file mod_cache.c.