68ba377fc3b124baa759662077c48077ebadb186minfrin/* Licensed to the Apache Software Foundation (ASF) under one or more
68ba377fc3b124baa759662077c48077ebadb186minfrin * contributor license agreements. See the NOTICE file distributed with
68ba377fc3b124baa759662077c48077ebadb186minfrin * this work for additional information regarding copyright ownership.
68ba377fc3b124baa759662077c48077ebadb186minfrin * The ASF licenses this file to You under the Apache License, Version 2.0
68ba377fc3b124baa759662077c48077ebadb186minfrin * (the "License"); you may not use this file except in compliance with
68ba377fc3b124baa759662077c48077ebadb186minfrin * the License. You may obtain a copy of the License at
68ba377fc3b124baa759662077c48077ebadb186minfrin *
68ba377fc3b124baa759662077c48077ebadb186minfrin * http://www.apache.org/licenses/LICENSE-2.0
68ba377fc3b124baa759662077c48077ebadb186minfrin *
68ba377fc3b124baa759662077c48077ebadb186minfrin * Unless required by applicable law or agreed to in writing, software
68ba377fc3b124baa759662077c48077ebadb186minfrin * distributed under the License is distributed on an "AS IS" BASIS,
68ba377fc3b124baa759662077c48077ebadb186minfrin * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
68ba377fc3b124baa759662077c48077ebadb186minfrin * See the License for the specific language governing permissions and
68ba377fc3b124baa759662077c48077ebadb186minfrin * limitations under the License.
68ba377fc3b124baa759662077c48077ebadb186minfrin */
68ba377fc3b124baa759662077c48077ebadb186minfrin
68ba377fc3b124baa759662077c48077ebadb186minfrin/**
68ba377fc3b124baa759662077c48077ebadb186minfrin * @file cache_socache_common.h
68ba377fc3b124baa759662077c48077ebadb186minfrin * @brief Common Shared Object Cache vars/structs
68ba377fc3b124baa759662077c48077ebadb186minfrin *
68ba377fc3b124baa759662077c48077ebadb186minfrin * @defgroup Cache_cache Cache Functions
68ba377fc3b124baa759662077c48077ebadb186minfrin * @ingroup MOD_SOCACHE_CACHE
68ba377fc3b124baa759662077c48077ebadb186minfrin * @{
68ba377fc3b124baa759662077c48077ebadb186minfrin */
68ba377fc3b124baa759662077c48077ebadb186minfrin
68ba377fc3b124baa759662077c48077ebadb186minfrin#ifndef CACHE_SOCACHE_COMMON_H
68ba377fc3b124baa759662077c48077ebadb186minfrin#define CACHE_SOCACHE_COMMON_H
68ba377fc3b124baa759662077c48077ebadb186minfrin
68ba377fc3b124baa759662077c48077ebadb186minfrin#include "apr_time.h"
68ba377fc3b124baa759662077c48077ebadb186minfrin
68ba377fc3b124baa759662077c48077ebadb186minfrin#include "cache_common.h"
68ba377fc3b124baa759662077c48077ebadb186minfrin
68ba377fc3b124baa759662077c48077ebadb186minfrin#define CACHE_SOCACHE_VARY_FORMAT_VERSION 1
68ba377fc3b124baa759662077c48077ebadb186minfrin#define CACHE_SOCACHE_DISK_FORMAT_VERSION 2
68ba377fc3b124baa759662077c48077ebadb186minfrin
68ba377fc3b124baa759662077c48077ebadb186minfrintypedef struct {
68ba377fc3b124baa759662077c48077ebadb186minfrin /* Indicates the format of the header struct stored on-disk. */
68ba377fc3b124baa759662077c48077ebadb186minfrin apr_uint32_t format;
68ba377fc3b124baa759662077c48077ebadb186minfrin /* The HTTP status code returned for this response. */
68ba377fc3b124baa759662077c48077ebadb186minfrin int status;
68ba377fc3b124baa759662077c48077ebadb186minfrin /* The size of the entity name that follows. */
68ba377fc3b124baa759662077c48077ebadb186minfrin apr_size_t name_len;
68ba377fc3b124baa759662077c48077ebadb186minfrin /* The number of times we've cached this entity. */
68ba377fc3b124baa759662077c48077ebadb186minfrin apr_size_t entity_version;
68ba377fc3b124baa759662077c48077ebadb186minfrin /* Miscellaneous time values. */
68ba377fc3b124baa759662077c48077ebadb186minfrin apr_time_t date;
68ba377fc3b124baa759662077c48077ebadb186minfrin apr_time_t expire;
68ba377fc3b124baa759662077c48077ebadb186minfrin apr_time_t request_time;
68ba377fc3b124baa759662077c48077ebadb186minfrin apr_time_t response_time;
68ba377fc3b124baa759662077c48077ebadb186minfrin /* Does this cached request have a body? */
68ba377fc3b124baa759662077c48077ebadb186minfrin unsigned int header_only:1;
68ba377fc3b124baa759662077c48077ebadb186minfrin /* The parsed cache control header */
68ba377fc3b124baa759662077c48077ebadb186minfrin cache_control_t control;
68ba377fc3b124baa759662077c48077ebadb186minfrin} cache_socache_info_t;
68ba377fc3b124baa759662077c48077ebadb186minfrin
68ba377fc3b124baa759662077c48077ebadb186minfrin#endif /* CACHE_SOCACHE_COMMON_H */
68ba377fc3b124baa759662077c48077ebadb186minfrin/** @} */