]> granicus.if.org Git - apache/blob - modules/cache/cache_storage.h
Fix a corner case where automatic APLOGNO number generation generates invalid code...
[apache] / modules / cache / cache_storage.h
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements.  See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License.  You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * @file cache_storage.h
19  * @brief Cache Storage Functions
20  *
21  * @defgroup Cache_storage  Cache Storage Functions
22  * @ingroup  MOD_CACHE
23  * @{
24  */
25
26 #ifndef CACHE_STORAGE_H
27 #define CACHE_STORAGE_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #include "mod_cache.h"
34 #include "cache_util.h"
35
36 /**
37  * cache_storage.c
38  */
39 int cache_remove_url(cache_request_rec *cache, request_rec *r);
40 int cache_create_entity(cache_request_rec *cache, request_rec *r,
41                         apr_off_t size, apr_bucket_brigade *in);
42 int cache_select(cache_request_rec *cache, request_rec *r);
43
44 /**
45  * invalidate a specific URL entity in all caches
46  *
47  * All cached entities for this URL are removed, usually in
48  * response to a POST/PUT or DELETE.
49  *
50  * This function returns OK if at least one entity was found and
51  * removed, and DECLINED if no cached entities were removed.
52  * @param cache cache_request_rec
53  * @param r request_rec
54  */
55 int cache_invalidate(cache_request_rec *cache, request_rec *r);
56
57 apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
58         const char **key);
59
60 /**
61  * Merge in cached headers into the response
62  * @param h cache_handle_t
63  * @param r request_rec
64  * @param top headers to be applied
65  * @param bottom headers to be overwritten
66  * @param revalidation true if revalidation is taking place
67  */
68 void cache_accept_headers(cache_handle_t *h, request_rec *r, apr_table_t *top,
69         apr_table_t *bottom, int revalidation);
70
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif /* !CACHE_STORAGE_H */
76 /** @} */