From: Amos Jeffries Date: Sun, 19 Jan 2014 22:43:22 +0000 (+1300) Subject: Docs: update refresh_pattern internal documentation X-Git-Tag: SQUID_3_5_0_1~407 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82b2cc1286df8570b2e07d6c39b4bf46a54d90cf;p=thirdparty%2Fsquid.git Docs: update refresh_pattern internal documentation --- diff --git a/src/refresh.cc b/src/refresh.cc index c102e018fc..09dce8aca4 100644 --- a/src/refresh.cc +++ b/src/refresh.cc @@ -116,6 +116,12 @@ static int refreshStaleness(const StoreEntry * entry, time_t check_time, const t static RefreshPattern DefaultRefresh; +/** Locate the first refresh_pattern rule that matches the given URL by regex. + * + * \note regexec() returns 0 if matched, and REG_NOMATCH otherwise + * + * \return A pointer to the refresh_pattern parameters to use, or NULL if there is no match. + */ const RefreshPattern * refreshLimits(const char *url) { @@ -129,6 +135,14 @@ refreshLimits(const char *url) return NULL; } +/** Locate the first refresh_pattern rule that has the given uncompiled regex. + * + * \note There is only one reference to this function, below. It always passes "." as the pattern. + * This function is only ever called if there is no URI. Because a regex match is impossible, Squid + * forces the "." rule to apply (if it exists) + * + * \return A pointer to the refresh_pattern parameters to use, or NULL if there is no match. + */ static const RefreshPattern * refreshUncompiledPattern(const char *pat) {