Only in squid-1.0.alpha9.henrik: build.log diff -c -r -x *.o -x *.orig -X exclude_files squid-1.0.alpha9/src/cache_cf.c squid-1.0.alpha9.henrik/src/cache_cf.c *** squid-1.0.alpha9/src/cache_cf.c Fri Apr 5 20:33:44 1996 --- squid-1.0.alpha9.henrik/src/cache_cf.c Fri Apr 5 20:31:58 1996 *************** *** 22,27 **** --- 22,28 ---- int relayPort; } Wais; int negativeTtl; + int negativeDnsTtl; int readTimeout; int lifetimeDefault; int connectTimeout; *************** *** 86,91 **** --- 87,93 ---- #define DefaultWaisRelayPort -1 #define DefaultNegativeTtl (5 * 60) /* 5 min */ + #define DefaultNegativeDnsTtl (2 * 60) /* 2 min */ #define DefaultReadTimeout (15 * 60) /* 15 min */ #define DefaultLifetimeDefault (200 * 60) /* 3+ hours */ #define DefaultConnectTimeout (2 * 60) /* 2 min */ *************** *** 643,648 **** --- 645,659 ---- Config.negativeTtl = i * 60; } + static void parseNegativeDnsLine(line_in) + char *line_in; + { + char *token; + int i; + GetInteger(i); + Config.negativeDnsTtl = i * 60; + } + static void parseReadTimeoutLine(line_in) char *line_in; { *************** *** 1283,1288 **** --- 1294,1303 ---- else if (!strcmp(token, "negative_ttl")) parseNegativeLine(line_in); + /* Parse a negative_dns_ttl line */ + else if (!strcmp(token, "negative_dns_ttl")) + parseNegativeDnsLine(line_in); + /* Parse a read_timeout line */ else if (!strcmp(token, "read_timeout")) parseReadTimeoutLine(line_in); *************** *** 1475,1480 **** --- 1490,1499 ---- int getNegativeTTL() { return Config.negativeTtl; + } + int getNegativeDNSTTL() + { + return Config.negativeDnsTtl; } int getCacheMemMax() { diff -c -r -x *.o -x *.orig -X exclude_files squid-1.0.alpha9/src/cache_cf.h squid-1.0.alpha9.henrik/src/cache_cf.h *** squid-1.0.alpha9/src/cache_cf.h Fri Apr 5 20:33:44 1996 --- squid-1.0.alpha9.henrik/src/cache_cf.h Fri Apr 5 20:30:56 1996 *************** *** 78,83 **** --- 78,84 ---- extern int getHttpTTL _PARAMS((void)); extern int getLogfileRotateNumber _PARAMS((void)); extern int getNegativeTTL _PARAMS((void)); + extern int getNegativeDNSTTL _PARAMS((void)); extern int getQuickAbort _PARAMS((void)); extern int getReadTimeout _PARAMS((void)); extern int getSourcePing _PARAMS((void)); diff -c -r -x *.o -x *.orig -X exclude_files squid-1.0.alpha9/src/cached.conf squid-1.0.alpha9.henrik/src/cached.conf *** squid-1.0.alpha9/src/cached.conf Fri Apr 5 20:33:44 1996 --- squid-1.0.alpha9.henrik/src/cached.conf Fri Apr 5 20:26:36 1996 *************** *** 532,537 **** --- 532,543 ---- #negative_ttl 5 # + # TAG: negative_dns_ttl (in minutes) + # Time-to-Live (TTL) for negative caching of failed DNS lookups. + # + #negative_dns_ttl 5 + + # # TAG: cache_mem_high (in percent) # The high water mark for cache memory storage. When the amount of # RAM used by the hot-object RAM cache reaches this point, the diff -c -r -x *.o -x *.orig -X exclude_files squid-1.0.alpha9/src/ipcache.c squid-1.0.alpha9.henrik/src/ipcache.c *** squid-1.0.alpha9/src/ipcache.c Thu Apr 4 07:19:49 1996 --- squid-1.0.alpha9.henrik/src/ipcache.c Fri Apr 5 20:33:01 1996 *************** *** 12,18 **** int ipcache_hash_entry_count(); #define IP_POS_TTL 86400 /* one day */ - #define IP_NEG_TTL 120 /* 2 minutes */ #define MAX_IP 1024 /* Maximum cached IP */ #define IP_LOW_WATER 70 #define IP_HIGH_WATER 90 --- 12,17 ---- *************** *** 452,458 **** } else { e->lastref = e->timestamp = cached_curtime; e->status = NEGATIVE_CACHED; ! e->ttl = IP_NEG_TTL; } ipcache_add_to_hash(e); --- 451,457 ---- } else { e->lastref = e->timestamp = cached_curtime; e->status = NEGATIVE_CACHED; ! e->ttl = getNegativeDNSTTL(); } ipcache_add_to_hash(e); *************** *** 515,521 **** } else { e->lastref = e->timestamp = cached_curtime; e->status = NEGATIVE_CACHED; ! e->ttl = IP_NEG_TTL; } } --- 514,520 ---- } else { e->lastref = e->timestamp = cached_curtime; e->status = NEGATIVE_CACHED; ! e->ttl = getNegativeDNSTTL(); } } *************** *** 741,747 **** plist = globalpending_search(token, data->global_pending); if (plist) { plist->entry->lastref = plist->entry->timestamp = cached_curtime; ! plist->entry->ttl = IP_NEG_TTL; plist->entry->status = NEGATIVE_CACHED; ipcache_call_pending(plist->entry); globalpending_remove(plist, data); --- 740,746 ---- plist = globalpending_search(token, data->global_pending); if (plist) { plist->entry->lastref = plist->entry->timestamp = cached_curtime; ! plist->entry->ttl = getNegativeDNSTTL(); plist->entry->status = NEGATIVE_CACHED; ipcache_call_pending(plist->entry); globalpending_remove(plist, data);