/* Licensed to the Apache Software Foundation (ASF) under one or more *contributorlicenseagreements.SeetheNOTICEfiledistributedwith *thisworkforadditionalinformationregardingcopyrightownership. *TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0 *(the"License");youmaynotusethisfileexceptincompliancewith *theLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting,software *distributedundertheLicenseisdistributedonan"ASIS"BASIS, *WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied. *SeetheLicenseforthespecificlanguagegoverningpermissionsand *limitationsundertheLicense.
*/
#define MSEC_ONE_DAY ((apr_time_t)(86400*APR_USEC_PER_SEC)) /* one day, in microseconds */ #define MSEC_ONE_HR ((apr_time_t)(3600*APR_USEC_PER_SEC)) /* one hour, in microseconds */ #define MSEC_ONE_MIN ((apr_time_t)(60*APR_USEC_PER_SEC)) /* one minute, in microseconds */ #define MSEC_ONE_SEC ((apr_time_t)(APR_USEC_PER_SEC)) /* one second, in microseconds */
/* static information about the local cache */ typedefstruct {
apr_array_header_t *cacheenable; /* URLs to cache */
apr_array_header_t *cachedisable; /* URLs not to cache */ /** store the headers that should not be stored in the cache */
apr_array_header_t *ignore_headers; /** store the identifiers that should not be used for key calculation */
apr_array_header_t *ignore_session_id; constchar *lockpath;
apr_time_t lockmaxage;
apr_uri_t *base_uri; /** ignore client's requests for uncached responses */ unsignedint ignorecachecontrol:1; /** ignore query-string when caching */ unsignedint ignorequerystring:1; /** run within the quick handler */ unsignedint quick:1; /* thundering herd lock */ unsignedint lock:1; unsignedint x_cache:1; unsignedint x_cache_detail:1; /* flag if CacheIgnoreHeader has been set */ #define CACHE_IGNORE_HEADERS_SET 1 #define CACHE_IGNORE_HEADERS_UNSET 0 unsignedint ignore_headers_set:1; /* flag if CacheIgnoreURLSessionIdentifiers has been set */ #define CACHE_IGNORE_SESSION_ID_SET 1 #define CACHE_IGNORE_SESSION_ID_UNSET 0 unsignedint ignore_session_id_set:1; unsignedint base_uri_set:1; unsignedint ignorecachecontrol_set:1; unsignedint ignorequerystring_set:1; unsignedint quick_set:1; unsignedint lock_set:1; unsignedint lockpath_set:1; unsignedint lockmaxage_set:1; unsignedint x_cache_set:1; unsignedint x_cache_detail_set:1;
} cache_server_conf;
typedefstruct { /* Minimum time to keep cached files in msecs */
apr_time_t minex; /* Maximum time to keep cached files in msecs */
apr_time_t maxex; /* default time to keep cached file in msecs */
apr_time_t defex; /* factor for estimating expires date */ double factor; /* cache enabled for this location */
apr_array_header_t *cacheenable; /* cache disabled for this location */ unsignedint disable:1; /* set X-Cache headers */ unsignedint x_cache:1; unsignedint x_cache_detail:1; /* serve stale on error */ unsignedint stale_on_error:1; /** ignore the last-modified header when deciding to cache this request */ unsignedint no_last_mod_ignore:1; /** ignore expiration date from server */ unsignedint store_expired:1; /** ignore Cache-Control: private header from server */ unsignedint store_private:1; /** ignore Cache-Control: no-store header from client or server */ unsignedint store_nostore:1; unsignedint minex_set:1; unsignedint maxex_set:1; unsignedint defex_set:1; unsignedint factor_set:1; unsignedint x_cache_set:1; unsignedint x_cache_detail_set:1; unsignedint stale_on_error_set:1; unsignedint no_last_mod_ignore_set:1; unsignedint store_expired_set:1; unsignedint store_private_set:1; unsignedint store_nostore_set:1; unsignedint enable_set:1; unsignedint disable_set:1;
} cache_dir_conf;
/* A linked-list of authn providers. */ typedefstruct cache_provider_list cache_provider_list;
/* per request cache information */ typedefstruct {
cache_provider_list *providers; /* possible cache providers */ const cache_provider *provider; /* current cache provider */ constchar *provider_name; /* current cache provider name */ int fresh; /* is the entity fresh? */
cache_handle_t *handle; /* current cache handle */
cache_handle_t *stale_handle; /* stale cache handle */
apr_table_t *stale_headers; /* original request headers. */ int in_checked; /* CACHE_SAVE must cache the entity */ int block_response; /* CACHE_SAVE must block response. */
apr_bucket_brigade *saved_brigade; /* copy of partial response */
apr_off_t saved_size; /* length of saved_brigade */
apr_time_t exp; /* expiration */
apr_time_t lastmod; /* last-modified time */
cache_info *info; /* current cache info */
ap_filter_t *save_filter; /* Enable us to restore the filter on error */
ap_filter_t *remove_url_filter; /* Enable us to remove the filter */ constchar *key; /* The cache key created for this *request
*/
apr_off_t size; /* the content length from the headers, or -1 */
apr_bucket_brigade *out; /* brigade to reuse for upstream responses */
cache_control_t control_in; /* cache control incoming */
} cache_request_rec;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.