Lines 57-67
Link Here
|
57 |
ap_filter_t *next; |
57 |
ap_filter_t *next; |
58 |
ap_filter_rec_t *cache_out_handle; |
58 |
ap_filter_rec_t *cache_out_handle; |
59 |
|
59 |
|
60 |
/* Delay initialization until we know we are handling a GET */ |
|
|
61 |
if (r->method_number != M_GET) { |
62 |
return DECLINED; |
63 |
} |
64 |
|
65 |
conf = (cache_server_conf *) ap_get_module_config(r->server->module_config, |
60 |
conf = (cache_server_conf *) ap_get_module_config(r->server->module_config, |
66 |
&cache_module); |
61 |
&cache_module); |
67 |
|
62 |
|
Lines 110-115
Link Here
|
110 |
rv = cache_select(r); |
105 |
rv = cache_select(r); |
111 |
if (rv != OK) { |
106 |
if (rv != OK) { |
112 |
if (rv == DECLINED) { |
107 |
if (rv == DECLINED) { |
|
|
108 |
|
109 |
/* We dont have a cache and we are not cacheble. */ |
110 |
if (r->method_number != M_GET) { |
111 |
return DECLINED; |
112 |
} |
113 |
|
113 |
if (!lookup) { |
114 |
if (!lookup) { |
114 |
|
115 |
|
115 |
/* |
116 |
/* |
Lines 167-172
Link Here
|
167 |
"file by %s cache", cache->provider_name); |
168 |
"file by %s cache", cache->provider_name); |
168 |
} |
169 |
} |
169 |
return DECLINED; |
170 |
return DECLINED; |
|
|
171 |
} else { |
172 |
/* We have a cache entry. Time to invalidate it if necessary */ |
173 |
if ((r->method_number == M_POST) || (r->method_number == M_PUT) || |
174 |
(r->method_number == M_DELETE)) { |
175 |
cache_remove_url(cache, r->pool); |
176 |
return DECLINED; |
177 |
} |
170 |
} |
178 |
} |
171 |
|
179 |
|
172 |
/* if we are a lookup, we are exiting soon one way or another; Restore |
180 |
/* if we are a lookup, we are exiting soon one way or another; Restore |