diff --git a/src/cache.c b/src/cache.c index 351276e4d..a75c1aa8b 100644 --- a/src/cache.c +++ b/src/cache.c @@ -670,9 +670,16 @@ enum act_return http_action_req_cache_use(struct act_rule *rule, struct proxy *p struct cache_entry *res; struct cache *cache = (struct cache *)rule->arg.act.p[0]; + check_request_for_cacheability(s, &s->req); + if ((s->txn->flags & (TX_CACHE_IGNORE|TX_CACHEABLE)) == TX_CACHE_IGNORE) + return ACT_RET_CONT; + if (!sha1_hosturi(s->txn)) return ACT_RET_CONT; + if (s->txn->flags & TX_CACHE_IGNORE) + return ACT_RET_CONT; + shctx_lock(shctx_ptr(cache)); res = entry_exist(cache, s->txn->cache_hash); if (res) {