- Added -i option which forces IP cache entry to be invalidated
just after an object retrieval begins.
- Includes all squid-1.0 changes up to squid-1.0.10.
+ - Added patch from srb@cuci.nl (Stephen R. van den Berg) for
+ - ttl_force_pattern
+ - quick_abort min pct max
Changes to squid-1.1.alpha11:
- Cleaned up pointers in protoUnregister().
- Includes all squid-1.0 changes up to squid-1.0.6.
+Changes to squid-1.1.alpha7.BuGless:
+
+ - cache_swap 0 is allowed (proxy only server, no swapping), mainly
+ intended for fast maintenance startups where the system already
+ has to be running, but the disk(s) have not been fsck'd yet.
+ - quick_abort actually works now
+ - quick_abort functionality made conditional
+ - ttl_pattern storage wasn't being cleaned upon a reread of
+ the config file (the patterns were added only, got duplicates)
+ - ttl_force_pattern a new config option to override the settings
+ of certain pages despite (or because) of enforced low expiry times
+ - Reduced the struct sentry size. Moved some attributes to mem_obj,
+ eliminated some. On typical 32-bit machines the size was 52 bytes,
+ now it's 32.
+ - Reduced /cache/log file size (still compatible with old format)
+
Changes to squid-1.1.alpha7:
- Added 'tcp_recv_bufsize' option to config.
/*
- * $Id: cache_cf.cc,v 1.70 1996/08/23 21:15:45 wessels Exp $
+ * $Id: cache_cf.cc,v 1.71 1996/08/26 22:00:04 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
#define DefaultSourcePing 0 /* default off */
#define DefaultCommonLogFormat 0 /* default off */
#define DefaultIdentLookup 0 /* default off */
-#define DefaultQuickAbort 0 /* default off */
+#define DefaultQuickAbortMin -1 /* default off */
+#define DefaultQuickAbortPct 0 /* default off */
+#define DefaultQuickAbortMax 0 /* default off */
#define DefaultNeighborTimeout 2 /* 2 seconds */
#define DefaultStallDelay 1 /* 1 seconds */
#define DefaultSingleParentBypass 0 /* default off */
if (token != (char *) NULL) { /* pct_age is optional */
if (sscanf(token, "%d", &pct_age) != 1)
self_destruct();
- }
- token = strtok(NULL, w_space); /* token: age_max */
- if (token != (char *) NULL) { /* age_max is optional */
- if (sscanf(token, "%d", &i) != 1)
- self_destruct();
- age_max = (time_t) (i * 60); /* convert minutes to seconds */
+
+ token = strtok(NULL, w_space); /* token: age_max */
+ if (token != (char *) NULL) { /* age_max is optional */
+ if (sscanf(token, "%d", &i) != 1)
+ self_destruct();
+ age_max = (time_t) (i * 60); /* convert minutes to seconds */
+ }
}
ttlAddToList(pattern, abs_ttl, pct_age, age_max);
safe_free(pattern);
}
+static void parseTTLForcePattern()
+{
+ char *token;
+ char *pattern;
+ time_t abs_ttl = 0;
+ time_t age_max = Config.ageMaxDefault;
+ int i;
+
+ token = strtok(NULL, w_space); /* token: regex pattern */
+ if (token == NULL)
+ self_destruct();
+ pattern = xstrdup(token);
+
+ GetInteger(i); /* token: abs_ttl */
+ abs_ttl = (time_t) (i * 60); /* convert minutes to seconds */
+
+ GetInteger(i);
+ age_max = (time_t) (i * 60); /* convert minutes to seconds */
+ ttlAddToForceList(pattern, abs_ttl, age_max);
+
+ safe_free(pattern);
+}
+
+static void parseQuickAbort()
+{
+ char *token;
+ int i;
+
+ GetInteger(i);
+ Config.quickAbort.min = i * 1024;
+ GetInteger(i);
+ Config.quickAbort.pct = i * 128 / 100; /* 128 is full scale */
+ GetInteger(i);
+ Config.quickAbort.max = i * 1024;
+}
+
static void parseNegativeLine()
{
char *token;
else if (!strcmp(token, "ttl_pattern"))
parseTTLPattern();
+ else if (!strcmp(token, "ttl_force_pattern"))
+ parseTTLForcePattern();
+
+ else if (!strcmp(token, "quick_abort"))
+ parseQuickAbort();
+
else if (!strcmp(token, "negative_ttl"))
parseNegativeLine();
else if (!strcmp(token, "source_ping"))
parseOnOff(&Config.sourcePing);
- else if (!strcmp(token, "quick_abort"))
- parseOnOff(&Config.quickAbort);
-
else if (!strcmp(token, "emulate_httpd_log"))
parseOnOff(&Config.commonLogFormat);
printf("WARNING: cache_swap (%d kbytes) is less than cache_mem (%d bytes).\n", Config.Swap.maxSize, Config.Mem.maxSize);
printf(" This will cause serious problems with your cache!!!\n");
printf(" Change your configuration file.\n");
- Config.Swap.maxSize = Config.Mem.maxSize >> 10;
- printf(" For this run, however, %s will use %d kbytes for cache_swap.\n", appname, Config.Swap.maxSize);
fflush(stdout); /* print message */
}
if (Config.cleanRate > -1 && Config.cleanRate < 60) {
wordlistDestroy(&Config.inside_firewall_list);
wordlistDestroy(&Config.dns_testname_list);
safe_free(Config.sslProxy.host);
+ ttlFreeList();
}
Config.redirectChildren = DefaultRedirectChildren;
Config.hotVmFactor = DefaultHotVmFactor;
Config.sourcePing = DefaultSourcePing;
- Config.quickAbort = DefaultQuickAbort;
+ Config.quickAbort.min = DefaultQuickAbortMin;
+ Config.quickAbort.pct = DefaultQuickAbortPct;
+ Config.quickAbort.max = DefaultQuickAbortMax;
Config.commonLogFormat = DefaultCommonLogFormat;
Config.debugOptions = safe_xstrdup(DefaultDebugOptions);
Config.neighborTimeout = DefaultNeighborTimeout;
/*
- * $Id: squid.h,v 1.39 1996/08/26 19:57:11 wessels Exp $
+ * $Id: squid.h,v 1.40 1996/08/26 22:00:07 wessels Exp $
*
* AUTHOR: Duane Wessels
*
extern int sslStart _PARAMS((int fd, char *, request_t *, char *, int *sz));
extern char *storeToString _PARAMS((StoreEntry *));
extern void ttlSet _PARAMS((StoreEntry *));
+extern void ttlFreeList _PARAMS((void));
extern void ttlAddToList _PARAMS((char *, time_t, int, time_t));
+extern void ttlAddToForceList _PARAMS((char *, time_t, time_t));
extern int waisStart _PARAMS((int, char *, method_t, char *, StoreEntry *));
extern void storeDirClean _PARAMS((void));