/usr/src/redhat/BUILD/httpd-2.2.3/modules/cache/mod_disk_cache.h

00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef MOD_DISK_CACHE_H
00018 #define MOD_DISK_CACHE_H
00019 
00020 /*
00021  * include for mod_disk_cache: Disk Based HTTP 1.1 Cache.
00022  */
00023 
00024 #define VARY_FORMAT_VERSION 3
00025 #define DISK_FORMAT_VERSION 4
00026 
00027 #define CACHE_HEADER_SUFFIX ".header"
00028 #define CACHE_DATA_SUFFIX   ".data"
00029 #define CACHE_VDIR_SUFFIX   ".vary"
00030 
00031 #define AP_TEMPFILE_PREFIX "/"
00032 #define AP_TEMPFILE_BASE   "aptmp"
00033 #define AP_TEMPFILE_SUFFIX "XXXXXX"
00034 #define AP_TEMPFILE_BASELEN strlen(AP_TEMPFILE_BASE)
00035 #define AP_TEMPFILE_NAMELEN strlen(AP_TEMPFILE_BASE AP_TEMPFILE_SUFFIX)
00036 #define AP_TEMPFILE AP_TEMPFILE_PREFIX AP_TEMPFILE_BASE AP_TEMPFILE_SUFFIX
00037 
00038 typedef struct {
00039     /* Indicates the format of the header struct stored on-disk. */
00040     apr_uint32_t format;
00041     /* The HTTP status code returned for this response.  */
00042     int status;
00043     /* The size of the entity name that follows. */
00044     apr_size_t name_len;
00045     /* The number of times we've cached this entity. */
00046     apr_size_t entity_version;
00047     /* Miscellaneous time values. */
00048     apr_time_t date;
00049     apr_time_t expire;
00050     apr_time_t request_time;
00051     apr_time_t response_time;
00052 } disk_cache_info_t;
00053 
00054 /*
00055  * disk_cache_object_t
00056  * Pointed to by cache_object_t::vobj
00057  */
00058 typedef struct disk_cache_object {
00059     const char *root;        /* the location of the cache directory */
00060     apr_size_t root_len;
00061     char *tempfile;    /* temp file tohold the content */
00062     const char *prefix;
00063     const char *datafile;    /* name of file where the data will go */
00064     const char *hdrsfile;    /* name of file where the hdrs will go */
00065     const char *hashfile;    /* Computed hash key for this URI */
00066     const char *name;   /* Requested URI without vary bits - suitable for mortals. */
00067     const char *key;    /* On-disk prefix; URI with Vary bits (if present) */
00068     apr_file_t *fd;          /* data file */
00069     apr_file_t *hfd;         /* headers file */
00070     apr_file_t *tfd;         /* temporary file for data */
00071     apr_off_t file_size;     /*  File size of the cached data file  */
00072     disk_cache_info_t disk_info; /* Header information. */
00073 } disk_cache_object_t;
00074 
00075 
00076 /*
00077  * mod_disk_cache configuration
00078  */
00079 /* TODO: Make defaults OS specific */
00080 #define CACHEFILE_LEN 20        /* must be less than HASH_LEN/2 */
00081 #define DEFAULT_DIRLEVELS 3
00082 #define DEFAULT_DIRLENGTH 2
00083 #define DEFAULT_MIN_FILE_SIZE 1
00084 #define DEFAULT_MAX_FILE_SIZE 1000000
00085 
00086 typedef struct {
00087     const char* cache_root;
00088     apr_size_t cache_root_len;
00089     int dirlevels;               /* Number of levels of subdirectories */
00090     int dirlength;               /* Length of subdirectory names */
00091     apr_off_t minfs;             /* minimum file size for cached files */
00092     apr_off_t maxfs;             /* maximum file size for cached files */
00093 } disk_cache_conf;
00094 
00095 #endif /*MOD_DISK_CACHE_H*/

Apacheに対してSun Jul 19 22:05:23 2009に生成されました。  doxygen 1.4.7