Re: What to do when the backend sends no caching information?

2008-12-12 Thread Per Buer
Hi,

If you have a look at the default VCL you'll see that varnish does a
pass when the object is not cacheable (see man vcl again) or if it Sets
a cookie. I think you have to override this manually, both in vcl_fetch
and in vcl_recv.

Per.

Alecs Henry wrote:
> Hi Per,
> 
> I'm actually using the cookies in the cache (using the information
> provided on the website -- set req.hash += req.http.cookie;) and it
> works just fine!
> One thing that the backend does is vary on user-agent, not only
> content-encoding (I've removed the UA vary on the response, though).
> 
> So looking into varnishlog I can see the pass, even after the hash is
> shown correctly.
> 
> Any pointers?
> 
> THanks!
> 
> Alecs
> 
> On Fri, Dec 12, 2008 at 7:21 PM, Per Buer  > wrote:
> 
> Hi,
> 
> Alecs Henry wrote:
> >
> > Well, turns out varnish may be setting the ttl all right (I do it in
> > vcl_fetch, but frankly there really is no way to see if it is set
> > correctly or not! or is there?) but the page always gets a PASS,
> never a
> > HIT. Age: is set to 0 by varnish.
> 
> The client probably sends a cookie. When varnish sees a cookie it does a
> pass. Please see the FAQ on notes on how to deal with this.
> 
> Per.
> 
> --
> http://linpro.no/ | http://redpill.se/
> 
> 


-- 
Per Buer - Leder Infrastruktur og Drift - Redpill Linpro
Telefon: 21 54 41 21 - Mobil: 958 39 117
http://linpro.no/ | http://redpill.se/



signature.asc
Description: OpenPGP digital signature
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Backend response

2008-12-12 Thread Per Buer
Hi Alecs,

You can modify the object in vcl_fetch. See
http://varnish.projects.linpro.no/wiki/VCLExampleDefault for a flow
chart of VCL. Also read through "man vcl".

You can alter the headers in vcl_fetch before doing "deliver" on them
which will store the object and insert it into the cache.

Yes, it makes sense.

Per.


Alecs Henry wrote:
> Hi Per,
> 
> I'm looking into changing the headers all right! Where do I do that in VCL?
> I wanted to try to set some cache control headers before the object was
> put into varnish cache.
> 
> Does that even make sense?
> 
> Thanks!
> 
> Alecs
> 
> On Fri, Dec 12, 2008 at 7:20 PM, Per Buer  > wrote:
> 
> Alecs Henry wrote:
> > Hi!
> >
> > Is there a place where I can alter the backend response before it is
> > inserted into the cache?
> 
> You can remove, add and alter headers - but there isn't much you can do
> to the content. Except to ESI, process it, I guess.
> 
> Per.
> 
> --
> http://linpro.no/ | http://redpill.se/
> 
> 


-- 
Per Buer - Leder Infrastruktur og Drift - Redpill Linpro
Telefon: 21 54 41 21 - Mobil: 958 39 117
http://linpro.no/ | http://redpill.se/



signature.asc
Description: OpenPGP digital signature
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: What to do when the backend sends no caching information?

2008-12-12 Thread Alecs Henry
Hi Per,

I'm actually using the cookies in the cache (using the information provided
on the website -- set req.hash += req.http.cookie;) and it works just fine!
One thing that the backend does is vary on user-agent, not only
content-encoding (I've removed the UA vary on the response, though).

So looking into varnishlog I can see the pass, even after the hash is shown
correctly.

Any pointers?

THanks!

Alecs

On Fri, Dec 12, 2008 at 7:21 PM, Per Buer  wrote:

> Hi,
>
> Alecs Henry wrote:
> >
> > Well, turns out varnish may be setting the ttl all right (I do it in
> > vcl_fetch, but frankly there really is no way to see if it is set
> > correctly or not! or is there?) but the page always gets a PASS, never a
> > HIT. Age: is set to 0 by varnish.
>
> The client probably sends a cookie. When varnish sees a cookie it does a
> pass. Please see the FAQ on notes on how to deal with this.
>
> Per.
>
> --
> http://linpro.no/ | http://redpill.se/
>
>
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Backend response

2008-12-12 Thread Alecs Henry
Hi Per,

I'm looking into changing the headers all right! Where do I do that in VCL?
I wanted to try to set some cache control headers before the object was put
into varnish cache.

Does that even make sense?

Thanks!

Alecs

On Fri, Dec 12, 2008 at 7:20 PM, Per Buer  wrote:

> Alecs Henry wrote:
> > Hi!
> >
> > Is there a place where I can alter the backend response before it is
> > inserted into the cache?
>
> You can remove, add and alter headers - but there isn't much you can do
> to the content. Except to ESI, process it, I guess.
>
> Per.
>
> --
> http://linpro.no/ | http://redpill.se/
>
>
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnishncsa

2008-12-12 Thread Alecs Henry
Thanks Dag, I must have missed it!

Alecs

On Fri, Dec 12, 2008 at 7:08 PM, Dag-Erling Smørgrav  wrote:

> "Alecs Henry"  writes:
> > What about cookies? Can varnish log cookie values? Or does it fit in
> > the same problem as the first message?
>
> Varnish can and does log cookies.  See the varnishlog(1) man page.
>
> DES
> --
> Dag-Erling Smørgrav - d...@des.no
>
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: What to do when the backend sends no caching information?

2008-12-12 Thread Per Buer
Hi,

Alecs Henry wrote:
>
> Well, turns out varnish may be setting the ttl all right (I do it in
> vcl_fetch, but frankly there really is no way to see if it is set
> correctly or not! or is there?) but the page always gets a PASS, never a
> HIT. Age: is set to 0 by varnish.

The client probably sends a cookie. When varnish sees a cookie it does a
pass. Please see the FAQ on notes on how to deal with this.

Per.

-- 
http://linpro.no/ | http://redpill.se/



signature.asc
Description: OpenPGP digital signature
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Backend response

2008-12-12 Thread Per Buer
Alecs Henry wrote:
> Hi!
> 
> Is there a place where I can alter the backend response before it is
> inserted into the cache?

You can remove, add and alter headers - but there isn't much you can do
to the content. Except to ESI, process it, I guess.

Per.

-- 
http://linpro.no/ | http://redpill.se/



signature.asc
Description: OpenPGP digital signature
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnishncsa

2008-12-12 Thread Dag-Erling Smørgrav
"Alecs Henry"  writes:
> What about cookies? Can varnish log cookie values? Or does it fit in
> the same problem as the first message?

Varnish can and does log cookies.  See the varnishlog(1) man page.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Backend response

2008-12-12 Thread Alecs Henry
Hi!

Is there a place where I can alter the backend response before it is
inserted into the cache?

Thanks!

Alecs
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


What to do when the backend sends no caching information?

2008-12-12 Thread Alecs Henry
Hi All,

In testing varnish in different situations, I came accross a backend that
sends no caching information in its responses, no Expires, cache-control or
anything.
Ok, I thought, I'll just set the TTL on that object (namely an html page) in
VCL.
Well, turns out varnish may be setting the ttl all right (I do it in
vcl_fetch, but frankly there really is no way to see if it is set correctly
or not! or is there?) but the page always gets a PASS, never a HIT. Age: is
set to 0 by varnish.

Thanks for all the help!

Alecs
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnishncsa

2008-12-12 Thread Alecs Henry
I wish I was a developer.. That would make my life so much easier!

What about cookies? Can varnish log cookie values? Or does it fit in the
same problem as the first message?

Thanks!

Alecs

On Thu, Dec 11, 2008 at 8:34 PM, Dag-Erling Smørgrav  wrote:

> "Alecs Henry"  writes:
> > Is there any way to tweak the varnishncsa log?
>
> Not currently.  Patches are welcome.
>
> DES
> --
> Dag-Erling Smørgrav - d...@des.no
>
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Web GUI for varnish

2008-12-12 Thread Petter Knudsen
As an early christmas gift, here is a snapshot of the web GUI being 
developed for the 2.1 release: 
http://varnish.projects.linpro.no/wiki/WebGui

It is not 100% finished (saving state and security being the major 
issues and the code needs some cleaning), but I hope people can test and 
play with it and give some input to the final version due in february. 
You MUST read the README file before using it, as it will describe it all.

WARNING: This is, as mentioned, not finished, so don't use it on 
anything critical, as the VCL and parameters might be overwritten 
without warning.

Petter, ready for the holidays

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc