summaryrefslogtreecommitdiff
path: root/modules/cache/mod_disk_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/cache/mod_disk_cache.c')
-rw-r--r--modules/cache/mod_disk_cache.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/cache/mod_disk_cache.c b/modules/cache/mod_disk_cache.c
index 92c5ad75..6b3e7733 100644
--- a/modules/cache/mod_disk_cache.c
+++ b/modules/cache/mod_disk_cache.c
@@ -403,10 +403,6 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
len = sizeof(expire);
apr_file_read_full(dobj->hfd, &expire, len, &len);
- if (expire < r->request_time) {
- return DECLINED;
- }
-
varray = apr_array_make(r->pool, 5, sizeof(char*));
rc = read_array(r, varray, dobj->hfd);
if (rc != APR_SUCCESS) {
@@ -823,6 +819,15 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
apr_array_header_t* varray;
apr_uint32_t format = VARY_FORMAT_VERSION;
+ /* If we were initially opened as a vary format, rollback
+ * that internal state for the moment so we can recreate the
+ * vary format hints in the appropriate directory.
+ */
+ if (dobj->prefix) {
+ dobj->hdrsfile = dobj->prefix;
+ dobj->prefix = NULL;
+ }
+
mkdir_structure(conf, dobj->hdrsfile, r->pool);
rv = apr_file_mktemp(&dobj->tfd, dobj->tempfile,
@@ -875,8 +880,6 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
return rv;
}
- dobj->name = h->cache_obj->key;
-
disk_info.format = DISK_FORMAT_VERSION;
disk_info.date = info->date;
disk_info.expire = info->expire;