Commit 3c7cd3b6 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remove the last remains of purge_hash, and obj.hash.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4614 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 1527b5fb
......@@ -744,17 +744,6 @@ ccf_purge_url(struct cli *cli, const char * const *av, void *priv)
ccf_purge(cli, aav, priv);
}
static void
ccf_purge_hash(struct cli *cli, const char * const *av, void *priv)
{
(void)av;
(void)priv;
cli_out(cli, "purge.hash is no longer supported.\n");
cli_result(cli, CLIS_CANT);
return;
}
static void
ccf_purge_list(struct cli *cli, const char * const *av, void *priv)
{
......@@ -795,8 +784,6 @@ static struct cli_proto ban_cmds[] = {
* XXX: COMPAT: to stay compatible with 1.x series syntax.
*/
{ CLI_HIDDEN("url.purge", 1, 1) "h", ccf_purge_url },
{ CLI_HIDDEN("hash.purge", 0, 1) "h", ccf_purge_hash },
{ CLI_HIDDEN("purge.hash", 0, 1) "h", ccf_purge_hash },
{ CLI_PURGE_URL, "", ccf_purge_url },
{ CLI_PURGE, "", ccf_purge },
......
......@@ -393,21 +393,6 @@ Immediately invalidate all documents matching the purge expression.
See
.Va Purge expressions
for more documentation and examples.
.It Cm purge.hash Ar regex
Immediately invalidate all documents where
.Va obj.hash
matches the
.Va regex .
The default object hash contains the values from
.Va req.url
and either
.Va req.http.host
or
.Va server.ip
depending on the presence of a Host: header in the request sent by the
client.
The object hash may be modified further by
.Va VCL.
.It Cm purge.list
Display the purge list.
.Pp
......
......@@ -2,4 +2,4 @@
test "Test banning a hash"
varnish v1 -arg "-b 127.0.0.1:80 -a 127.0.0.1:0" -start -clierr 300 "purge.hash foo"
varnish v1 -arg "-b 127.0.0.1:80 -a 127.0.0.1:0" -start -clierr 101 "purge.hash foo"
......@@ -103,7 +103,7 @@ varnish v1 -badvcl {
varnish v1 -vcl {
backend b { .host = "127.0.0.1"; }
sub vcl_recv { purge_hash ("foo"); }
sub vcl_recv { purge_url ("foo"); }
}
varnish v1 -badvcl {
......
......@@ -457,26 +457,6 @@ parse_purge_url(struct tokenlist *tl)
/*--------------------------------------------------------------------*/
static void
parse_purge_hash(struct tokenlist *tl)
{
vcc_NextToken(tl);
Expect(tl, '(');
vcc_NextToken(tl);
Fb(tl, 1, "VRT_purge(sp, \"obj.hash\", \"~\", ");
if (!vcc_StringVal(tl)) {
vcc_ExpectedStringval(tl);
return;
}
Expect(tl, ')');
vcc_NextToken(tl);
Fb(tl, 0, ", 0);\n");
}
/*--------------------------------------------------------------------*/
static void
parse_esi(struct tokenlist *tl)
{
......@@ -553,7 +533,6 @@ static struct action_table {
{ "esi", parse_esi },
{ "panic", parse_panic },
{ "purge", parse_purge },
{ "purge_hash", parse_purge_hash },
{ "purge_url", parse_purge_url },
{ "remove", parse_unset }, /* backward compatibility */
{ "set", parse_set },
......
......@@ -267,9 +267,6 @@ in the matched string.
As
.Fn regsuball
but this replaces all occurrences.
.It Fn purge_hash "regex"
Purge all objects in cache whose hash strings match
.Fa regex .
.It Fn purge_url "regex"
Purge all objects in cache whose URLs match
.Fa regex .
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment