Tue Dec 13 13:28:49 UTC 2005 Alberto Bertogli * Use darcsweb.cgi's modification time to invalidate cache entries. Besides the repository inventory modification time, we also want to check the script's modification time, so if we make changes to darcsweb (updating it, for instance), there's no possibility of serving stale pages if the user forgets to clean the cache. You still need to clean it for configuration changes. diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi --- old-darcsweb/darcsweb.cgi 2018-05-10 19:10:14.000000000 +0000 +++ new-darcsweb/darcsweb.cgi 2018-05-10 19:10:14.000000000 +0000 @@ -425,8 +425,9 @@ inv = config.repodir + '/_darcs/inventory' cache_lastmod = os.stat(fname).st_mtime repo_lastmod = os.stat(inv).st_mtime + dw_lastmod = os.stat(sys.argv[0]).st_mtime - if repo_lastmod > cache_lastmod: + if repo_lastmod > cache_lastmod or dw_lastmod > cache_lastmod: # the entry is too old, remove it and return a miss os.unlink(fname)