In message <[email protected]>, Daniel Bruessler writes:
>Hi!
>
>I'd like to call a sub function and use the return-function. But is
>there a return-function?
>
>#called from vcl_fetch: call vcl_custom_cachingtime;
>sub vcl_custom_cachingtimes {
>
>    if (req.url ~ "^/abc/*" {
>        set obj.ttl = 10m;
>        #return (0);
>    }
>
>    if (req.url ~ "^/def/*" {
>        set obj.ttl = 30s;
>    }
>
>}

It's not clear from you example what you would use the return for,
but you can simulate it, but putting you return value in a header
instead

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | 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
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to