Hi,<br><br><div class="gmail_quote">On Fri, May 18, 2012 at 12:27 PM, Javier Casares <span dir="ltr"><<a href="mailto:javier@casares.org" target="_blank">javier@casares.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm readin this:<br>
<br>
-s [name=]type[,options]<br>
Use the specified storage backend. See Storage Types for a list of<br>
supported storage types. This option can be used multiple times to<br>
specify multiple storage files. You can name the different backends.<br>
Varnish will then reference that backend with the given name in logs,<br>
statistics, etc.<br>
<br>
In my sysconfig file I have this (it's a demo try):<br>
<br>
-s malloc,128M \<br>
-s file,/var/lib/varnish/varnish_storage_1.bin,128M \<br>
-s file,/var/lib/varnish/varnish_storage_2.bin,512M"<br>
<br>
Is possible to asign in the VCL backends what kind of storage use in<br>
each backend, or by host or something similar? How can I do it?<br></blockquote><div><br></div><div>Yes. Just give it a name (-s foo=file,...) and set beresp.storage in vcl_fetch.</div><div><br></div><div>sub vcl_fetch {</div>
<div> if (beresp.http.storage-hind ~ "bar") {</div><div> beresp.storage = "bar";</div><div> } else {</div><div> beresp.storage = "foo";</div><div> }</div><div>}</div><div><br></div>
<div>I'm not 100% sure about the quoting. This is untested code.</div><div><br></div><div>-- </div></div><img src="http://www.varnish-software.com/sites/default/files/varnishsoft_white_190x47.png"><div>Per Buer<br>Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer<br>
<i>Varnish makes websites fly!</i><div><a href="http://www.varnish-software.com/whitepapers" target="_blank">Whitepapers</a> | <a href="http://www.youtube.com/watch?v=x7t2Sp174eI" target="_blank">Video</a> | <a href="https://twitter.com/varnishsoftware" target="_blank">Twitter</a> <br>
<br></div></div><br>