0

Merge remote branch 'munki/master'

This commit is contained in:
Andrew Brown
2010-09-09 22:43:35 -04:00
2 changed files with 5 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ helptext = """
def main():
parser = OptionParser(usage=helptext)
parser.add_option("-p", "--processes", dest="procs", help="How many chunks to render in parallel. A good number for this is 1 more than the number of cores in your computer. Default 2", default=2, action="store", type="int")
parser.add_option("-c", "--cachelife", dest="cachelife", help="How many minutes a tile will be considered valid by the web browser before it fetches a new copy. Used if you have a crontab or similar running this every once in a while. Default is 24 hours.", default=1440, action="store", type="int")
parser.add_option("-c", "--cachelife", dest="cachelife", help="How many minutes a tile will be considered valid by the web browser before it fetches a new copy. Used if you have a crontab or similar running this every once in a while. Default is 24 hours.", default=0, action="store", type="int")
options, args = parser.parse_args()

View File

@@ -35,8 +35,10 @@
}
}
url = url + '.' + config.fileExt;
var d = new Date();
url += '?c=' + Math.floor(d.getTime() / (1000 * 60 * config.cacheMinutes));
if(config.cacheMinutes > 0) {
var d = new Date();
url += '?c=' + Math.floor(d.getTime() / (1000 * 60 * config.cacheMinutes));
}
return(url);
},
tileSize: new google.maps.Size(config.tileSize, config.tileSize),