]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
- Added patch from srb@cuci.nl (Stephen R. van den Berg) for
authorwessels <>
Tue, 27 Aug 1996 03:59:57 +0000 (03:59 +0000)
committerwessels <>
Tue, 27 Aug 1996 03:59:57 +0000 (03:59 +0000)
                - ttl_force_pattern
                - quick_abort min pct max

CONTRIBUTORS
ChangeLog
include/version.h
src/cache_cf.cc
src/squid.h

index aa79ad1ddf8bdea43c0126722471d76f1715d106..0e72c8abfe70381bdf83b1279fd8b8469818c2f4 100644 (file)
@@ -29,6 +29,7 @@ and ideas to make this software available.
        Igor Vinokurov <igor@cs.ibank.ru>
        Russell Street <r.street@auckland.ac.nz>
        Cord Beermann <webadm@cc.fh-lippe.de>
+       Stephen R. van den Berg <srb@cuci.nl>
 
 
 Development of this caching software is funded by the National Science
index bc1ccb17e675769fb90e8a3641db5c609cd8c36f..e1e787c29a759fe845290dfeb725195d6b36c022 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,9 @@ Changes to squid-1.1.alpha12:
        - 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:
 
@@ -45,6 +48,22 @@ Changes to squid-1.1.alpha8:
        - 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.
index 394c81bed0bd9b099381916d18aa7bcceb830dbc..a488995c988d6aadfa60c14d51339086dcadddb0 100644 (file)
@@ -1,9 +1,9 @@
-/* $Id: version.h,v 1.31 1996/08/23 21:31:35 wessels Exp $
+/* $Id: version.h,v 1.32 1996/08/26 22:00:04 wessels Exp $
  *
  *  SQUID_VERSION - String for version id of this distribution
  */
 #ifndef SQUID_VERSION
-#define SQUID_VERSION  "1.1.alpha12"
+#define SQUID_VERSION  "1.1.alpha7.BuGless"
 #endif
 
 #ifndef SQUID_RELEASE_TIME
index e1a8dfb49fbdc5059065b68b3fdfcf97e8614b65..6378d268fa5f031c7a3c2c822bff0b5faf343840 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
@@ -164,7 +164,9 @@ struct SquidConfig Config;
 #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 */
@@ -540,18 +542,55 @@ static void parseTTLPattern()
     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;
@@ -1106,6 +1145,12 @@ int parseConfigFile(file_name)
        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();
 
@@ -1154,9 +1199,6 @@ int parseConfigFile(file_name)
        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);
 
@@ -1263,8 +1305,6 @@ int parseConfigFile(file_name)
        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) {
@@ -1355,6 +1395,7 @@ static void configFreeMemory()
     wordlistDestroy(&Config.inside_firewall_list);
     wordlistDestroy(&Config.dns_testname_list);
     safe_free(Config.sslProxy.host);
+    ttlFreeList();
 }
 
 
@@ -1392,7 +1433,9 @@ static void configSetFactoryDefaults()
     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;
index 1742c45f4204129558d17ecdcb7f1c2693380aa2..a50439f801ad71a44b2b7a61af99204abe93d1cc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
  *
@@ -288,6 +288,8 @@ extern void send_announce _PARAMS((void));
 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));