mirror of
https://github.com/apache/httpd.git
synced 2025-11-05 05:30:39 +03:00
mod_cache: Apply the API change that allows future mod_cache providers to
invalidate cache entries, which will fix PR15868. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208822 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -370,12 +370,13 @@
|
|||||||
* 20111120.0 (2.5.0-dev) Remove parts of conn_state_t that are private to the MPM
|
* 20111120.0 (2.5.0-dev) Remove parts of conn_state_t that are private to the MPM
|
||||||
* 20111121.0 (2.5.0-dev) Pass ap_errorlog_info struct to error_log hook,
|
* 20111121.0 (2.5.0-dev) Pass ap_errorlog_info struct to error_log hook,
|
||||||
* add pool to ap_errorlog_info.
|
* add pool to ap_errorlog_info.
|
||||||
|
* 20111201.0 (2.5.0-dev) Add invalidate_entity() to the cache provider.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
|
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
|
||||||
|
|
||||||
#ifndef MODULE_MAGIC_NUMBER_MAJOR
|
#ifndef MODULE_MAGIC_NUMBER_MAJOR
|
||||||
#define MODULE_MAGIC_NUMBER_MAJOR 20111121
|
#define MODULE_MAGIC_NUMBER_MAJOR 20111201
|
||||||
#endif
|
#endif
|
||||||
#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
|
#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
|
||||||
|
|
||||||
|
|||||||
1
modules/cache/mod_cache.h
vendored
1
modules/cache/mod_cache.h
vendored
@@ -109,6 +109,7 @@ typedef struct {
|
|||||||
const char *urlkey);
|
const char *urlkey);
|
||||||
int (*remove_url) (cache_handle_t *h, request_rec *r);
|
int (*remove_url) (cache_handle_t *h, request_rec *r);
|
||||||
apr_status_t (*commit_entity)(cache_handle_t *h, request_rec *r);
|
apr_status_t (*commit_entity)(cache_handle_t *h, request_rec *r);
|
||||||
|
apr_status_t (*invalidate_entity)(cache_handle_t *h, request_rec *r);
|
||||||
} cache_provider;
|
} cache_provider;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
8
modules/cache/mod_cache_disk.c
vendored
8
modules/cache/mod_cache_disk.c
vendored
@@ -1325,6 +1325,11 @@ static apr_status_t commit_entity(cache_handle_t *h, request_rec *r)
|
|||||||
return APR_SUCCESS;
|
return APR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static apr_status_t invalidate_entity(cache_handle_t *h, request_rec *r)
|
||||||
|
{
|
||||||
|
return APR_ENOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
static void *create_dir_config(apr_pool_t *p, char *dummy)
|
static void *create_dir_config(apr_pool_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
disk_cache_dir_conf *dconf = apr_pcalloc(p, sizeof(disk_cache_dir_conf));
|
disk_cache_dir_conf *dconf = apr_pcalloc(p, sizeof(disk_cache_dir_conf));
|
||||||
@@ -1502,7 +1507,8 @@ static const cache_provider cache_disk_provider =
|
|||||||
&create_entity,
|
&create_entity,
|
||||||
&open_entity,
|
&open_entity,
|
||||||
&remove_url,
|
&remove_url,
|
||||||
&commit_entity
|
&commit_entity,
|
||||||
|
&invalidate_entity
|
||||||
};
|
};
|
||||||
|
|
||||||
static void disk_cache_register_hook(apr_pool_t *p)
|
static void disk_cache_register_hook(apr_pool_t *p)
|
||||||
|
|||||||
Reference in New Issue
Block a user