summaryrefslogtreecommitdiff
path: root/modules/cache/cache_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/cache/cache_util.c')
-rw-r--r--modules/cache/cache_util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c
index 75d35bd6..78770ffd 100644
--- a/modules/cache/cache_util.c
+++ b/modules/cache/cache_util.c
@@ -235,6 +235,14 @@ CACHE_DECLARE(int) ap_cache_check_freshness(cache_handle_t *h,
cc_cresp = apr_table_get(h->resp_hdrs, "Cache-Control");
expstr = apr_table_get(h->resp_hdrs, "Expires");
+ if (ap_cache_liststr(NULL, cc_cresp, "no-cache", NULL)) {
+ /*
+ * The cached entity contained Cache-Control: no-cache, so treat as
+ * stale causing revalidation
+ */
+ return 0;
+ }
+
if ((agestr = apr_table_get(h->resp_hdrs, "Age"))) {
age_c = apr_atoi64(agestr);
}