Commit 87f8c9ba authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add "-t default_ttl" option. 120 seconds by default.


git-svn-id: http://www.varnish-cache.org/svn/trunk@219 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent aac69000
......@@ -30,6 +30,8 @@ struct heritage {
/* Storage method */
struct stevedore *stevedore;
unsigned default_ttl;
};
extern struct heritage heritage;
......
......@@ -290,6 +290,7 @@ usage(void)
fprintf(stderr, " %-28s # %s\n", "-p number", "TCP listen port");
fprintf(stderr, " %-28s # %s\n",
"-s kind[,storageoptions]", "Backend storage specification");
fprintf(stderr, " %-28s # %s\n", "-t", "Default TTL");
#if 0
-c clusterid@cluster_controller
-m memory_limit
......@@ -394,7 +395,9 @@ main(int argc, char *argv[])
VCC_InitCompile();
while ((o = getopt(argc, argv, "b:df:p:s:")) != -1)
heritage.default_ttl = 120;
while ((o = getopt(argc, argv, "b:df:p:s:t:")) != -1)
switch (o) {
case 'b':
bflag = optarg;
......@@ -411,6 +414,9 @@ main(int argc, char *argv[])
case 's':
sflag = optarg;
break;
case 't':
heritage.default_ttl = strtoul(optarg, NULL, 0);
break;
default:
usage();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment