b4e629844bbf1e3540f3ab32563aa2f02ef7f7db max Fri Mar 27 08:37:59 2015 -0700 changes to UDC that allow to 1. load bigDataUrls from a specific local directory, configured in hg.conf. this is useful in GBIB and mirrors where lots of time and space is wasted on loading local files via the http protocol. 2. deactivate the udc cache. This is useful on OSX which doesn't support sparse files and so quickly fills any harddisk with hundreds of gigabytes of files full with zeros. diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 6a211a4..95086f5 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -360,31 +360,34 @@ { return cfgOptionDefault("downloads.server", "hgdownload.cse.ucsc.edu"); } void setUdcTimeout(struct cart *cart) /* set the udc cache timeout */ { int timeout = cartUsualInt(cart, "udcTimeout", 300); if (udcCacheTimeout() < timeout) udcSetCacheTimeout(timeout); } void setUdcCacheDir() /* set the path to the udc cache dir */ { +if (cfgOptionBooleanDefault("udc.useLocalDiskCache", TRUE)) udcSetDefaultDir(cfgOptionDefault("udc.cacheDir", udcDefaultDir())); +else + udcSetDefaultDir(NULL); } char *wrapWhiteFont(char *s) /* Write white font around s */ { static char buf[256]; safef(buf, sizeof(buf), "%s", s); return buf; } char *hDocumentRoot() /* get the path to the DocumentRoot, or the default */ { return cfgOptionDefault("browser.documentRoot", DOCUMENT_ROOT);