Apache HTTPD
Classes | Functions | Variables
cache_util.c File Reference
#include "mod_cache.h"
#include "cache_util.h"
#include <ap_provider.h>

Go to the source code of this file.

Classes

struct  cache_table_getm_t
 

Functions

static int uri_meets_conditions (const apr_uri_t *filter, const apr_size_t pathlen, const apr_uri_t *url, const char *path)
 
int cache_use_early_url (request_rec *r)
 
static cache_provider_listget_provider (request_rec *r, struct cache_enable *ent, cache_provider_list *providers)
 
cache_provider_listcache_get_providers (request_rec *r, cache_server_conf *conf)
 
apr_int64_t ap_cache_current_age (cache_info *info, const apr_time_t age_value, apr_time_t now)
 
apr_status_t cache_try_lock (cache_server_conf *conf, cache_request_rec *cache, request_rec *r)
 
apr_status_t cache_remove_lock (cache_server_conf *conf, cache_request_rec *cache, request_rec *r, apr_bucket_brigade *bb)
 
int ap_cache_check_no_cache (cache_request_rec *cache, request_rec *r)
 
int ap_cache_check_no_store (cache_request_rec *cache, request_rec *r)
 
int cache_check_freshness (cache_handle_t *h, cache_request_rec *cache, request_rec *r)
 
const charap_cache_tokstr (apr_pool_t *p, const char *list, const char **str)
 
apr_time_t ap_cache_hex2usec (const char *x)
 
void ap_cache_usec2hex (apr_time_t j, char *y)
 
static void cache_hash (const char *it, char *val, int ndepth, int nlength)
 
charap_cache_generate_name (apr_pool_t *p, int dirlevels, int dirlength, const char *name)
 
charcache_strqtok (char *str, const char *sep, char **last)
 
int ap_cache_control (request_rec *r, cache_control_t *cc, const char *cc_header, const char *pragma_header, apr_table_t *headers)
 
static int cache_control_remove (request_rec *r, const char *cc_header, apr_table_t *headers)
 
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)
 
apr_table_tcache_merge_headers_out (request_rec *r)
 
static int cache_table_getm_do (void *v, const char *key, const char *val)
 
const charcache_table_getm (apr_pool_t *p, const apr_table_t *t, const char *key)
 

Variables

static int *const aplog_module_index = &( cache_module.module_index)
 
apr_OFN_ap_cache_generate_key_tcache_generate_key
 

Function Documentation

◆ cache_control_remove()

static int cache_control_remove ( request_rec r,
const char cc_header,
apr_table_t headers 
)
static

Parse the Cache-Control, identifying and removing headers that exist as tokens after the no-cache and private tokens.

Definition at line 1139 of file cache_util.c.

◆ cache_hash()

static void cache_hash ( const char it,
char val,
int  ndepth,
int  nlength 
)
static

Definition at line 875 of file cache_util.c.

◆ cache_table_getm_do()

static int cache_table_getm_do ( void *  v,
const char key,
const char val 
)
static

The most common case is a single header, and this is covered by a fast path that doesn't allocate any memory. On the second and subsequent header, an array is created and the array concatenated together to form the final value.

Definition at line 1298 of file cache_util.c.

◆ get_provider()

static cache_provider_list * get_provider ( request_rec r,
struct cache_enable ent,
cache_provider_list providers 
)
static

Definition at line 146 of file cache_util.c.

◆ uri_meets_conditions()

static int uri_meets_conditions ( const apr_uri_t filter,
const apr_size_t  pathlen,
const apr_uri_t url,
const char path 
)
static

Definition at line 33 of file cache_util.c.

Variable Documentation

◆ aplog_module_index

int* const aplog_module_index = &( cache_module.module_index)
static

Definition at line 22 of file cache_util.c.

◆ cache_generate_key

apr_OFN_ap_cache_generate_key_t* cache_generate_key
extern

Definition at line 23 of file mod_cache.c.