<span style='font-family:Verdana'><span style='font-size:12px'>Hello,<br /> 
<br /> 
I'm running a forum that has a ttl to expire content to guests only, but I would like to opitmize it to purge a page when we have new posts or after 24h (to update counters).<br /> 
<br /> 
My 1st question is how can I get the hiden input value I have that tell varnish that we have a new post? <br /> 
<br /> 
<span class="webkit-html-tag"><input <span class="webkit-html-attribute-name">type</span>="<span class="webkit-html-attribute-value">hidden</span>" <span class="webkit-html-attribute-name">name</span>="canpurge" <span class="webkit-html-attribute-name">value</span>="/topic/123-my-topic/" /></span> <br /> 
<br /> 
I was thinking of something like this:<br /> 
<br /> 
<div> 
        sub vcl_recv {</div> 
<div> 
            if (req.request == "POST" && FORM.FIELD == "canpurge) {</div> 
<div> 
                purge req.http.host == example.com && req.url ~ ^FORM.CANPURGE.VALUE.*$</div> 
<div> 
            }</div> 
<div> 
        }<br /> 
        <br /> 
        This is an excertt of my actual configuration:<br /> 
        <br /> 
        ====================================================================================================<br /> 
        <br /> 
        <div> 
                sub vcl_recv {</div> 
        <div> 
                 </div> 
        <div> 
                  ## == Mobile ==</div> 
        <div> 
                  if (req.http.User-Agent ~ "(iPad|iPhone|iPod|Android|SymbianOS|^BlackBerry|^SonyEricsson|^Nokia|^SAMSUNG|^LG)") {</div> 
        <div> 
                    return(pass);</div> 
        <div> 
                  }</div> 
        <div> 
                 </div> 
        <div> 
                  if (!((req.http.Cookie ~ "member_id=" && req.http.Cookie !~ "member_id=(0|-1)") || req.http.Cookie ~ "(guestSkinChoice|language)"))  {</div> 
        <div> 
                    if (req.url ~ "^/(public|forum|topic|gallery|blogs|members|user|calendar)/") {</div> 
        <div> 
                      unset req.http.cookie;</div> 
        <div> 
                      set req.grace = 15s;</div> 
        <div> 
                    }</div> 
        <div> 
                    if (req.url == "/" || req.url == "/index.php") {</div> 
        <div> 
                      unset req.http.cookie;</div> 
        <div> 
                      set req.grace = 15s;</div> 
        <div> 
                    }</div> 
        <div> 
                  }</div> 
        <div> 
                }</div> 
        <div> 
                 </div> 
        <div> 
                sub vcl_fetch {</div> 
        <div> 
                  if (!((req.http.Cookie ~ "member_id=" && req.http.Cookie !~ "member_id=(0|-1)") || req.http.Cookie ~ "(guestSkinChoice|language)")) {</div> 
        <div> 
                 </div> 
        <div> 
                    ## == INDEX ==</div> 
        <div> 
                 </div> 
        <div> 
                    if (req.url == "/" || req.url == "/index.php") {</div> 
        <div> 
                      unset beresp.http.set-cookie;</div> 
        <div> 
                      set beresp.ttl = 300s;</div> 
        <div> 
                      set beresp.grace = 30s;</div> 
        <div> 
                    }</div> 
        <div> 
                 </div> 
        <div> 
                    ## == ESI ==</div> 
        <div> 
                 </div> 
        <div> 
                    if (req.url ~ "^/(gallery/image|topic)/") {</div> 
        <div> 
                      set beresp.do_esi = true;</div> 
        <div> 
                      unset beresp.http.set-cookie;</div> 
        <div> 
                      set beresp.ttl = 300s;</div> 
        <div> 
                      set beresp.grace = 30s;</div> 
        <div> 
                 </div> 
        <div> 
                    ## Others</div> 
        <div> 
                 </div> 
        <div> 
                    } elseif (req.url ~ "^/(public|forum|gallery|blogs|members|user|calendar)/") {</div> 
        <div> 
                      unset beresp.http.set-cookie;</div> 
        <div> 
                      set beresp.ttl = 600s;</div> 
        <div> 
                      set beresp.grace = 30s;</div> 
        <div> 
                    }</div> 
        <div> 
                  }</div> 
        <div> 
                }<br /> 
                <br /> 
                ====================================================================================================<br /> 
                <br /> 
                Thanks</div> 
</div> 
</span></span>