RequestFlags.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9/* DEBUG: section 73 HTTP Request */
10
11#include "squid.h"
12#include "debug/Stream.h"
13#include "RequestFlags.h"
14
15#include <iostream>
16
17// When adding new flags, please update cloneAdaptationImmune() as needed.
18// returns a partial copy of the flags that includes only those flags
19// that are safe for a related (e.g., ICAP-adapted) request to inherit
22{
23 // At the time of writing, all flags where either safe to copy after
24 // adaptation or were not set at the time of the adaptation. If there
25 // are flags that are different, they should be cleared in the clone.
26 return *this;
27}
28
29void
30RequestFlags::disableCacheUse(const char * const reason)
31{
32 debugs(16, 3, "for " << reason);
33 cachable.veto();
34 noCache = true; // may already be true
35}
36
void disableCacheUse(const char *reason)
Definition: RequestFlags.cc:30
RequestFlags cloneAdaptationImmune() const
Definition: RequestFlags.cc:21
SupportOrVeto cachable
whether the response may be stored in the cache
Definition: RequestFlags.h:35
void veto()
makes decision() false regardless of past or future support() calls
Definition: SupportOrVeto.h:29
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:194

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors