src/lib/udc.c 1.34

1.34 2010/02/24 00:55:09 angie
Another tweak required to make the cache timeout work: when we do fetch info, update the cache file mod times to reset the cache timeout clock.
Index: src/lib/udc.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/udc.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -b -B -U 4 -r1.33 -r1.34
--- src/lib/udc.c	23 Feb 2010 22:04:07 -0000	1.33
+++ src/lib/udc.c	24 Feb 2010 00:55:09 -0000	1.34
@@ -824,8 +824,15 @@
 	{
 	file->updateTime = info.updateTime;
 	file->size = info.size;
 	memcpy(&(file->connInfo), &(info.ci), sizeof(struct connInfo));
+	// update cache file mod times, so if we're caching we won't do this again
+	// until the timeout has expired again:
+	if (udcCacheTimeout() > 0 && fileExists(file->bitmapFileName))
+	    {
+	    touchFile(file->bitmapFileName);
+	    touchFile(file->sparseFileName);
+	    }
 	}
 
     /* Make directory. */
     makeDirsOnPath(file->cacheDir);