[master] f8b5e53 Implement the "purge" action, now that we have renamed "the facility previously known as purge" to ban.

Poul-Henning Kamp phk at varnish-cache.org
Mon Feb 28 12:00:06 CET 2011


commit f8b5e53dffb43fb7a27e1a21d8117630a63c88bc
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Feb 28 10:54:47 2011 +0000

    Implement the "purge" action, now that we have renamed "the facility
    previously known as purge" to ban.

diff --git a/lib/libvcl/vcc_action.c b/lib/libvcl/vcc_action.c
index 82614d8..8850909 100644
--- a/lib/libvcl/vcc_action.c
+++ b/lib/libvcl/vcc_action.c
@@ -364,6 +364,16 @@ parse_rollback(struct vcc *tl)
 /*--------------------------------------------------------------------*/
 
 static void
+parse_purge(struct vcc *tl)
+{
+
+	vcc_NextToken(tl);
+	Fb(tl, 1, "VRT_purge(sp, 0, 0);\n");
+}
+
+/*--------------------------------------------------------------------*/
+
+static void
 parse_synthetic(struct vcc *tl)
 {
 	vcc_NextToken(tl);
@@ -402,6 +412,7 @@ static struct action_table {
 	{ "set",		parse_set },
 	{ "synthetic",		parse_synthetic },
 	{ "unset",		parse_unset },
+	{ "purge",		parse_purge, VCL_MET_MISS | VCL_MET_HIT },
 	{ NULL,			NULL }
 };
 



More information about the varnish-commit mailing list