AW: caching everything incl. 403?

2008-12-21 Thread Neil.Scholten
Hi,

It doesn't work :/

sub vcl_fetch {

/* Set NON-200 caching */
if (obj.status != 200)
{
set obj.cacheable = 1;
set obj.ttl = 300s;
}
[...]

Error-Message:

Expected ID got '1'
(program line 290), at
(/etc/varnish/default.vcl Line 20 Pos 37)
set obj.cacheable = 1;
###-

VCL compilation failed

Any idea?

--neil

-Ursprüngliche Nachricht-
Von: varnish-misc-boun...@projects.linpro.no 
[mailto:varnish-misc-boun...@projects.linpro.no] Im Auftrag von Tollef Fog Heen
Gesendet: Dienstag, 16. Dezember 2008 16:43
An: varnish-misc@projects.linpro.no
Betreff: Re: caching everything incl. 403?

]] Loesche, Lukas, scoyo 

| Also, what criteria has to be meet for if(obj.cacheable) to be true?

from bin/varnishd/rfc2616.c:

switch (sp-obj-response) {
case 200: /* OK */
case 203: /* Non-Authoritative Information */
case 300: /* Multiple Choices */
case 301: /* Moved Permanently */
case 302: /* Moved Temporarily */
case 410: /* Gone */
case 404: /* Not Found */
sp-obj-cacheable = 1;
[...]
default:
sp-obj-cacheable = 0;

In other words, by default it'll be marked as non-cacheable. You should
be able to do something like:

if (obj.status == 403) {
   set obj.cacheable = 1;
}

in your VCL.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


next release?

2008-12-21 Thread Sascha Ottolski
Hi folks,

I'm curious when the next stable (minor) release is planned. I'm 
especially interested in

Date: 2008-11-14 01:19:33 +0100 (Fri, 14 Nov 2008)
New Revision: 3390

Modified:
   trunk/varnish-cache/lib/libvarnish/binary_heap.c
Log:
Rework the binary heap, we use for expiry processing, to deal more
gracefully with large number of objects.

which seem to be in the trunk, but didn't made it into 2.0.2.

If no release is planned, which trunk revision could be recommended for 
productive environment?


Thanks,

Sascha

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


Re: next release?

2008-12-21 Thread Poul-Henning Kamp
In message 200812211455.11650.ottol...@web.de, Sascha Ottolski writes:

I'm curious when the next stable (minor) release is planned. I'm 
especially interested in

I don't know if we have a plan as such, but I expect a minor release
before I start integrating the persistent storage stuff.

-trunk right now should be safe.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: AW: caching everything incl. 403?

2008-12-21 Thread Poul-Henning Kamp
In message 200812211441.28344.ottol...@web.de, Sascha Ottolski writes:
Am Sonntag 21 Dezember 2008 14:18:56 schrieb neil.schol...@scoyo.com:


you should probably omit the quotes?

set obj.cacheable = 1;

set obj.cacheable = true;

It's a boolean.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc