changeset 104124:05be2b60df7a

* net/tramp-cache.el (tramp-cache-inhibit-cache ): New defvar. (tramp-get-file-property): Use it.
author Michael Albinus <michael.albinus@gmx.de>
date Sun, 02 Aug 2009 17:15:42 +0000
parents 132eb17eec1d
children fd4d8124e329
files lisp/net/tramp-cache.el
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/tramp-cache.el	Sun Aug 02 15:37:07 2009 +0000
+++ b/lisp/net/tramp-cache.el	Sun Aug 02 17:15:42 2009 +0000
@@ -69,6 +69,9 @@
 (defvar tramp-cache-data (make-hash-table :test 'equal)
   "Hash table for remote files properties.")
 
+(defvar tramp-cache-inhibit-cache nil
+  "Inhibit cache read access, when non-nil.")
+
 (defcustom tramp-persistency-file-name
   (cond
    ;; GNU Emacs.
@@ -103,7 +106,7 @@
   (let* ((hash (or (gethash vec tramp-cache-data)
 		   (puthash vec (make-hash-table :test 'equal)
 			    tramp-cache-data)))
-	 (value (if (hash-table-p hash)
+	 (value (if (and (null tramp-cache-inhibit-cache) (hash-table-p hash))
 		    (gethash property hash default)
 		  default)))
     (tramp-message vec 8 "%s %s %s" file property value)
@@ -182,8 +185,8 @@
     (aset key 3 nil))
   (let* ((hash (gethash key tramp-cache-data))
 	 (value (if (hash-table-p hash)
-		   (gethash property hash default)
-		 default)))
+		    (gethash property hash default)
+		  default)))
     (tramp-message key 7 "%s %s" property value)
     value))