Apache HTTPD
Classes | Macros | Functions | Variables
mod_file_cache.c File Reference
#include "apr.h"
#include "apr_mmap.h"
#include "apr_strings.h"
#include "apr_hash.h"
#include "apr_buckets.h"
#include "apr_want.h"
#include "httpd.h"
#include "http_config.h"
#include "http_log.h"
#include "http_protocol.h"
#include "http_request.h"
#include "http_core.h"

Go to the source code of this file.

Classes

struct  a_file
 
struct  a_server_config
 

Macros

#define APR_WANT_STRFUNC
 

Functions

static void * create_server_config (apr_pool_t *p, server_rec *s)
 
static void cache_the_file (cmd_parms *cmd, const char *filename, int mmap)
 
static const charcachefilehandle (cmd_parms *cmd, void *dummy, const char *filename)
 
static const charcachefilemmap (cmd_parms *cmd, void *dummy, const char *filename)
 
static int file_cache_post_config (apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 
static int file_cache_xlat (request_rec *r)
 
static int mmap_handler (request_rec *r, a_file *file)
 
static int sendfile_handler (request_rec *r, a_file *file)
 
static int file_cache_handler (request_rec *r)
 
static void register_hooks (apr_pool_t *p)
 

Variables

static const command_rec file_cache_cmds []
 
static int *const aplog_module_index = &( file_cache_module.module_index)
 

Macro Definition Documentation

◆ APR_WANT_STRFUNC

#define APR_WANT_STRFUNC

Definition at line 82 of file mod_file_cache.c.

Function Documentation

◆ cache_the_file()

static void cache_the_file ( cmd_parms cmd,
const char filename,
int  mmap 
)
static

< type, mtime, ctime, atime, size

< Open the file for reading

<

Deprecated:
See also
APR_FOPEN_READ

< Open the file in binary mode (This flag is ignored on UNIX because it has no meaning)

<

Deprecated:
See also
APR_FOPEN_BINARY

< Platform dependent tag to open the file for use across multiple threads

<

Deprecated:
See also
APR_FOPEN_XTHREAD

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

Definition at line 125 of file mod_file_cache.c.

◆ cachefilehandle()

static const char * cachefilehandle ( cmd_parms cmd,
void *  dummy,
const char filename 
)
static

Definition at line 206 of file mod_file_cache.c.

◆ cachefilemmap()

static const char * cachefilemmap ( cmd_parms cmd,
void *  dummy,
const char filename 
)
static

Definition at line 217 of file mod_file_cache.c.

◆ create_server_config()

static void * create_server_config ( apr_pool_t p,
server_rec s 
)
static

Definition at line 117 of file mod_file_cache.c.

◆ file_cache_handler()

static int file_cache_handler ( request_rec r)
static

< Module has handled this stage.

< Module declines to handle

RFC 2616: HTTP

< Module declines to handle

< Module declines to handle

RFC 2616: HTTP

< Module has handled this stage.

< Module has handled this stage.

Definition at line 309 of file mod_file_cache.c.

◆ file_cache_post_config()

static int file_cache_post_config ( apr_pool_t p,
apr_pool_t plog,
apr_pool_t ptemp,
server_rec s 
)
static

< Module has handled this stage.

Definition at line 229 of file mod_file_cache.c.

◆ file_cache_xlat()

static int file_cache_xlat ( request_rec r)
static

< Module declines to handle

< Module has handled this stage.

< Module declines to handle

< Module has handled this stage.

Definition at line 239 of file mod_file_cache.c.

◆ mmap_handler()

static int mmap_handler ( request_rec r,
a_file file 
)
static

< Module has handled this stage.

Definition at line 270 of file mod_file_cache.c.

◆ register_hooks()

static void register_hooks ( apr_pool_t p)
static

Definition at line 392 of file mod_file_cache.c.

◆ sendfile_handler()

static int sendfile_handler ( request_rec r,
a_file file 
)
static

< Module has handled this stage.

Definition at line 291 of file mod_file_cache.c.

Variable Documentation

◆ aplog_module_index

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

Definition at line 405 of file mod_file_cache.c.

◆ file_cache_cmds

const command_rec file_cache_cmds[]
static
Initial value:
=
{
{ "cachefile" , cachefilehandle , NULL , 128 , ITERATE, "A space separated list of files to add to the file handle cache at config time" },
{ "mmapfile" , cachefilemmap , NULL , 128 , ITERATE, "A space separated list of files to mmap at config time" },
{NULL}
}
@ ITERATE
Definition http_config.h:53
static const char * cachefilehandle(cmd_parms *cmd, void *dummy, const char *filename)
static const char * cachefilemmap(cmd_parms *cmd, void *dummy, const char *filename)
return NULL
Definition mod_so.c:359

Definition at line 383 of file mod_file_cache.c.