]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/RefreshPattern.h
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_REFRESHPATTERN_H_
10 #define SQUID_REFRESHPATTERN_H_
12 #include "base/RegexPattern.h"
14 /// a representation of a refresh pattern.
17 MEMPROXY_CLASS(RefreshPattern
);
27 #define REFRESH_DEFAULT_MAX static_cast<time_t>(259200)
29 RefreshPattern(const char *aPattern
, const decltype(RegexPattern::flags
) &reFlags
) :
30 pattern(reFlags
, aPattern
),
31 min(0), pct(0.20), max(REFRESH_DEFAULT_MAX
),
35 memset(&flags
, 0, sizeof(flags
));
39 while (RefreshPattern
*t
= next
) {
45 // ~RefreshPattern() default destructor is fine
56 #if USE_HTTP_VIOLATIONS
58 bool override_lastmod
;
67 // statistics about how many matches this pattern has had
68 mutable struct stats_
{
69 stats_() : matchTests(0), matchCount(0) {}
73 // TODO: some stats to indicate how useful/less the flags are would be nice.
77 #endif /* SQUID_REFRESHPATTERN_H_ */