Cache dynamic URLs

Iliya Sharov isharov at yandex-team.ru
Thu Mar 3 17:35:23 CET 2011


Hi.
May be
sub vcl_hash {
         set req.hash +=req.url;
         return(hash);
}

sub vcl_fetch {
         if (req.url ~ "(php") { set beresp.ttl =30s;}
}

and  -p lru_interval=30 in command-line run options?
Wbr,
Iliya Sharov
03.03.2011 19:23, Shibashish ?????:
> Hi All,
>
> My "varnishtop -b -i TxURL" shows...
>
>      9.99 TxURL         
>  /abc.php?id=2183&status=2&bt1=686&bt2=3285&pl1=1051&pl2=504&stat=1
>      9.99 TxURL         
>  /abc.php?id=2183&status=2&bt1=686&bt2=3285&pl1=1051&pl2=504&stat=2
>      9.99 TxURL         
>  /xyz.php?id=2183&status=2&bt1=686&bt2=3285&pl1=1051&pl2=504&stat=2
>      6.00 TxURL         
>  /aabb.php?id=2183&status=2&bt1=686&bt2=3285&pl1=1051&pl2=504&stat=2
>      5.99 TxURL         
>  /abc.php?id=2183&status=2&bt1=3285&bt2=1433&pl1=504&pl2=142&stat=2
>      4.99 TxURL         
>  /xyz.php?id=2183&status=2&bt1=3285&bt2=1433&pl1=504&pl2=142&stat=2
>      4.99 TxURL         
>  /abc.php?id=2183&status=2&bt1=3285&bt2=1433&pl1=504&pl2=142&stat=1
>      4.00 TxURL         
>  /podsaabb.php?id=2183&status=2&bt1=1433&bt2=3285&pl1=504&pl2=142&stat=2
>      4.00 TxURL         
>  /podsaabb.php?id=2183&status=2&bt1=3285&bt2=1433&pl1=504&pl2=142&stat=2
>      4.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=1433&bt2=3285&pl1=504&pl2=142&stat=2
>      4.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=1433&bt2=3285&pl1=504&pl2=142&stat=1
>      3.99 TxURL          /xyz.php?id=2182&status=1
>      3.00 TxURL         
>  /aabb.php?id=2183&status=2&bt1=1433&bt2=3285&pl1=142&pl2=1053&stat=2
>      3.00 TxURL         
>  /abc.php?id=2182&status=1&bt1=1412&bt2=0&pl1=318&pl2=6667&stat=1
>      3.00 TxURL         
>  /xyz.php?id=2183&status=2&bt1=3285&bt2=7852&pl1=142&pl2=1053&stat=2
>      3.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=3285&bt2=7852&pl1=142&pl2=1053&stat=1
>      3.00 TxURL         
>  /xyz.php?id=2183&status=2&bt1=7676&bt2=7852&pl1=142&pl2=1053&stat=2
>      3.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=7676&bt2=1432&pl1=360&pl2=1053&stat=2
>      3.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=7676&bt2=1432&pl1=360&pl2=1053&stat=1
>      3.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=3285&bt2=7852&pl1=142&pl2=1053&stat=2
>      3.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=1433&bt2=3285&pl1=142&pl2=1053&stat=2
>      3.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=1433&bt2=3285&pl1=142&pl2=1053&stat=1
>      3.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=7852&bt2=0&pl1=142&pl2=1053&stat=2
>      3.00 TxURL         
>  /xyz.php?id=2183&status=2&bt1=1433&bt2=3285&pl1=504&pl2=142&stat=2
>      3.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=7852&bt2=0&pl1=142&pl2=1053&stat=1
>      2.00 TxURL         
>  /aabb.php?id=2183&status=2&bt1=7676&bt2=1432&pl1=360&pl2=1053&stat=2
>      2.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=7676&bt2=0&pl1=1053&pl2=360&stat=2
>      2.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=7676&bt2=1432&pl1=142&pl2=1051&stat=1
>      2.00 TxURL         
>  /aabb.php?id=2183&status=2&bt1=7852&bt2=0&pl1=142&pl2=1053&stat=2
>      2.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=7676&bt2=7852&pl1=142&pl2=1053&stat=2
>      2.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=3285&bt2=686&pl1=504&pl2=142&stat=1
>      2.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=7676&bt2=7852&pl1=142&pl2=1053&stat=1
>      2.00 TxURL         
>  /xyz.php?id=2183&status=2&bt1=3285&bt2=686&pl1=504&pl2=142&stat=2
>      2.00 TxURL         
>  /abc.php?id=2183&status=2&bt1=7676&bt2=1432&pl1=142&pl2=1051&stat=2
>      2.00 TxURL         
>  /xyz.php?id=2183&status=2&bt1=7852&bt2=7676&pl1=142&pl2=1053&stat=2
>      2.00 TxURL         
>  /xyz.php?id=2183&status=2&bt1=7676&bt2=1432&pl1=360&pl2=1053&stat=2
>
> How can i cache those dynamic pages in Varnish, say for 30 sec ?
>
> Thanks.
>
> --
> Shib
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110303/8bffab10/attachment-0003.html>


More information about the varnish-misc mailing list