73#if !(APR_HAS_SENDFILE || APR_HAS_MMAP)
74#error mod_file_cache only works on systems with APR_HAS_SENDFILE or APR_HAS_MMAP
82#define APR_WANT_STRFUNC
85#if APR_HAVE_SYS_TYPES_H
96module AP_MODULE_DECLARE_DATA file_cache_module;
144 "unable to stat(%s), skipping",
fspec);
149 "%s isn't a regular file, skipping",
fspec);
154 "%s is too large to cache, skipping",
fspec);
162 "unable to open(%s, O_RDONLY), skipping",
fspec);
182 "unable to mmap %s, skipping",
filename);
213 "unable to cache file: %s. Sendfile is not supported on this OS",
filename);
224 "unable to cache file: %s. MMAP is not supported by this OS",
filename);
386 "A space separated list of files to add to the file handle cache at config time"),
388 "A space separated list of files to mmap at config time"),
int int const char ** match
APR-UTIL Buckets/Bucket Brigades.
APR Standard Headers Support.
#define ap_get_module_config(v, m)
void ap_hook_post_config(ap_HOOK_post_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_DECLARE_MODULE(foo)
#define AP_INIT_ITERATE(directive, func, mconfig, where, help)
char * ap_server_root_relative(apr_pool_t *p, const char *fname)
void ap_hook_handler(ap_HOOK_handler_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define ap_set_module_config(v, m, val)
apr_status_t ap_pass_brigade(ap_filter_t *filter, apr_bucket_brigade *bucket)
int ap_core_translate(request_rec *r)
void ap_set_etag(request_rec *r)
int ap_meets_conditions(request_rec *r)
apr_time_t ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
int ap_discard_request_body(request_rec *r)
void ap_hook_translate_name(ap_HOOK_translate_name_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_update_mtime(request_rec *r, apr_time_t dependency_mtime)
#define APR_BRIGADE_INSERT_TAIL(b, e)
apr_pool_t apr_dbd_t apr_dbd_results_t ** res
#define STANDARD20_MODULE_STUFF
int ap_strcmp_match(const char *str, const char *expected)
const char apr_file_t * file
#define APR_HASH_KEY_STRING
apr_vformatter_buff_t * c
#define apr_pcalloc(p, size)
apr_size_t const char * filename
#define APR_RFC822_DATE_LEN
#define AP_IS_DEFAULT_HANDLER_NAME(x)
static void * create_server_config(apr_pool_t *p, server_rec *s)
static int file_cache_handler(request_rec *r)
static const char * cachefilehandle(cmd_parms *cmd, void *dummy, const char *filename)
static const command_rec file_cache_cmds[]
static int mmap_handler(request_rec *r, a_file *file)
static void register_hooks(apr_pool_t *p)
static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap)
static const char * cachefilemmap(cmd_parms *cmd, void *dummy, const char *filename)
static int sendfile_handler(request_rec *r, a_file *file)
static int file_cache_xlat(request_rec *r)
static int file_cache_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
Structure to store things which are per connection.
A structure that represents the current request.
struct ap_filter_t * output_filters
struct ap_conf_vector_t * request_config
apr_table_t * headers_out
A structure to store information for each virtual server.
struct ap_conf_vector_t * module_config
apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)