]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Rename cache_dir option read-only to no-store
authorhno <>
Tue, 17 Apr 2007 04:10:49 +0000 (04:10 +0000)
committerhno <>
Tue, 17 Apr 2007 04:10:49 +0000 (04:10 +0000)
The cache_dir read-only flag is a bit confusing. It only stops objects
from getting added to the store, it does not stop old objects from being
deleted. no-store is a more appropriate name for this option.

src/SwapDir.cc
src/cf.data.pre

index 46cd6eb916b8d33c16e1006ae09ab6fdaeb3daf3..9587116a5183c8184263d3a95630083aac9ff9e6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: SwapDir.cc,v 1.7 2005/01/03 16:08:25 robertc Exp $
+ * $Id: SwapDir.cc,v 1.8 2007/04/16 22:10:49 hno Exp $
  *
  * DEBUG: section ??    Swap Dir base object
  * AUTHOR: Robert Collins
@@ -196,7 +196,7 @@ SwapDir::parseOptions(int reconfiguring)
     if (reconfiguring) {
         if (old_read_only != flags.read_only) {
             debug(3, 1) ("Cache dir '%s' now %s\n",
-                         path, flags.read_only ? "Read-Only" : "Read-Write");
+                         path, flags.read_only ? "No-Store" : "Read-Write");
         }
     }
 }
@@ -215,7 +215,7 @@ SwapDir::dumpOptions(StoreEntry * entry) const
 bool
 SwapDir::optionReadOnlyParse(char const *option, const char *value, int reconfiguring)
 {
-    if (strcmp(option, "read-only") != 0)
+    if (strcmp(option, "no-store") != 0 && strcmp(option, "read-only") != 0)
         return false;
 
     int read_only = 0;
@@ -234,7 +234,7 @@ void
 SwapDir::optionReadOnlyDump(StoreEntry * e) const
 {
     if (flags.read_only)
-        storeAppendPrintf(e, " read-only");
+        storeAppendPrintf(e, " no-store");
 }
 
 bool
index fa5bf21914e597eca9f667c7c14bf8492283a7fe..2296f06123f5c223f0a10ae9c97179a1179d7c40 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.432 2007/04/15 14:46:13 serassio Exp $
+# $Id: cf.data.pre,v 1.433 2007/04/16 22:10:49 hno Exp $
 #
 #
 # SQUID Web Proxy Cache                http://www.squid-cache.org/
@@ -1157,7 +1157,7 @@ DOC_START
 
        Common options:
 
-       read-only, this cache_dir is read only.
+       no-store, no new objects should be stored to this cache_dir
 
        max-size=n, refers to the max object size this storedir supports.
        It is used to initially choose the storedir to dump the object.