c79e39ad568d9af854765f64049534044ef6c034nd/* Licensed to the Apache Software Foundation (ASF) under one or more
2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650takashi * contributor license agreements. See the NOTICE file distributed with
c79e39ad568d9af854765f64049534044ef6c034nd * this work for additional information regarding copyright ownership.
d3e250aab242db84d14060985b5db675a731d548nd * The ASF licenses this file to You under the Apache License, Version 2.0
c79e39ad568d9af854765f64049534044ef6c034nd * (the "License"); you may not use this file except in compliance with
c79e39ad568d9af854765f64049534044ef6c034nd * the License. You may obtain a copy of the License at
c79e39ad568d9af854765f64049534044ef6c034nd *
c79e39ad568d9af854765f64049534044ef6c034nd * http://www.apache.org/licenses/LICENSE-2.0
c79e39ad568d9af854765f64049534044ef6c034nd *
c79e39ad568d9af854765f64049534044ef6c034nd * Unless required by applicable law or agreed to in writing, software
8928b6e739f1de5efcfa2a258f2cee76b52c6dfdgryzor * distributed under the License is distributed on an "AS IS" BASIS,
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e1e8390280254f7f0580d701e583f670643d4f3fnilgun * See the License for the specific language governing permissions and
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen * limitations under the License.
c79e39ad568d9af854765f64049534044ef6c034nd */
c79e39ad568d9af854765f64049534044ef6c034nd
/**
* @file cache_disk_common.h
* @brief Common Disk Cache vars/structs
*
* @defgroup Cache_cache Cache Functions
* @ingroup MOD_DISK_CACHE
* @{
*/
#ifndef CACHE_DIST_COMMON_H
#define CACHE_DIST_COMMON_H
#define VARY_FORMAT_VERSION 5
#define DISK_FORMAT_VERSION 6
#define CACHE_HEADER_SUFFIX ".header"
#define CACHE_DATA_SUFFIX ".data"
#define CACHE_VDIR_SUFFIX ".vary"
#define AP_TEMPFILE_PREFIX "/"
#define AP_TEMPFILE_BASE "aptmp"
#define AP_TEMPFILE_SUFFIX "XXXXXX"
#define AP_TEMPFILE_BASELEN strlen(AP_TEMPFILE_BASE)
#define AP_TEMPFILE_NAMELEN strlen(AP_TEMPFILE_BASE AP_TEMPFILE_SUFFIX)
#define AP_TEMPFILE AP_TEMPFILE_PREFIX AP_TEMPFILE_BASE AP_TEMPFILE_SUFFIX
typedef struct {
/* Indicates the format of the header struct stored on-disk. */
apr_uint32_t format;
/* The HTTP status code returned for this response. */
int status;
/* The size of the entity name that follows. */
apr_size_t name_len;
/* The number of times we've cached this entity. */
apr_size_t entity_version;
/* Miscellaneous time values. */
apr_time_t date;
apr_time_t expire;
apr_time_t request_time;
apr_time_t response_time;
/* The ident of the body file, so we can test the body matches the header */
apr_ino_t inode;
apr_dev_t device;
/* Does this cached request have a body? */
unsigned int has_body:1;
unsigned int header_only:1;
/* The parsed cache control header */
cache_control_t control;
} disk_cache_info_t;
#endif /* CACHE_DIST_COMMON_H */
/** @} */