Force cache a php page
Dennis Storm - Drecomm BV
d.storm at drecomm.nl
Tue Feb 22 13:03:41 CET 2011
Looks like you have a typo in the vcl config. Try using php instead of
phg :)
--- bad ---
vcl_recv
if (req.url ~ "\.phg(\?.*)?$") {
return(lookup);}
--- better ---
vcl_recv
if (req.url ~ "\.php(\?.*)?$") {
return(lookup);}
?
Kind regards.
Dennis Storm
Senior Systeembeheerder
------------------------------------------------------------------------
E d.storm at drecomm.nl
T +31 (0)50 - 577 58 22 (doorkiesnummer: 9701)
M +31 (0)6 - 414 101 81
drecomm
------------------------------------------------------------------------
Vestiging Groningen
Hoendiep 208 T +31 (0)50 - 577 58 22 Bekijk onze actuele projecten
9745 ED Groningen F +31 (0)50 - 577 58 23 www.drecomm.nl
<http://www.drecomm.nl>
------------------------------------------------------------------------
On 02/22/2011 12:56 PM, Shibashish wrote:
> Hi All,
>
> I have a website under varnish-2.1.5-1. I have a php page (test.php)
> which is kinda static and I can cache it for some time (5 mins). The
> URLs hitting this page are like the following due to which the varnish
> cache is MISSed and the apache webserver is being hit. How do I do a
> regex to overcome this? My trial config is mentioned in the end....
>
> 1.00 TxURL
> /test.php?id=219488&TabID=3&Res=2&dt=866845858823555200
> 1.00 TxURL
> /test.php?id=253114&TabID=3&Res=2&dt=846642321042837100
> 1.00 TxURL
> /test.php?id=104326&TabID=3&Res=2&dt=575570316149238400
> 1.00 TxURL
> /test.php?id=30946&TabID=3&Res=2&dt=109061349055833870
> 1.00 TxURL
> /test.php?id=109331&TabID=3&Res=2&dt=284968385895093150
> 1.00 TxURL
> /test.php?id=147630&TabID=3&Res=2&dt=182582005324904030
> 1.00 TxURL
> /test.php?id=226618&TabID=3&Res=2&dt=567666382104328500
> 1.00 TxURL
> /test.php?id=44438&TabID=3&Res=2&dt=894643067109792400
> 1.00 TxURL
> /test.php?id=219029&TabID=3&Res=2&dt=120583019713746690
> 1.00 TxURL
> /test.php?id=92700&TabID=3&Res=2&dt=812672457300415500
> 1.00 TxURL
> /test.php?id=244364&TabID=3&Res=2&dt=543154670573941800
> 1.00 TxURL
> /test.php?id=204543&TabID=3&Res=2&dt=108553982023531000
> 1.00 TxURL
> /test.php?id=155579&TabID=3&Res=2&dt=609157805933082500
> 1.00 TxURL
> /test.php?id=100248&TabID=3&Res=2&dt=329215175928002100
> 1.00 TxURL
> /test.php?id=155347&TabID=3&Res=2&dt=324280933690657500
> 1.00 TxURL
> /test.php?id=153167&TabID=3&Res=2&dt=262366359106033180
> 1.00 TxURL
> /test.php?id=175035&TabID=3&Res=2&dt=748310387497392400
> 1.00 TxURL
> /test.php?id=122942&TabID=3&Res=2&dt=89373125154077630
> 1.00 TxURL
> /test.php?id=157531&TabID=3&Res=2&dt=164945409132294180
> 1.00 TxURL
> /test.php?id=100248&TabID=3&Res=2&dt=381019014643790400
> 1.00 TxURL
> /test.php?id=103053&TabID=3&Res=2&dt=597790616600820500
>
>
> vcl_recv
>
> if (req.url ~ "\.phg(\?.*)?$") {
> return(lookup);}
>
> 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/20110222/6d28d2c8/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: top_logo.jpg
Type: image/jpeg
Size: 24234 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110222/6d28d2c8/attachment-0003.jpg>
More information about the varnish-misc
mailing list