Commit afae3a37 authored by Michael Albinus's avatar Michael Albinus
Browse files

* net/tramp-cache.el (tramp-cache-inhibit-cache ): New defvar.

(tramp-get-file-property): Use it.
parent b9173dc2
...@@ -69,6 +69,9 @@ ...@@ -69,6 +69,9 @@
(defvar tramp-cache-data (make-hash-table :test 'equal) (defvar tramp-cache-data (make-hash-table :test 'equal)
"Hash table for remote files properties.") "Hash table for remote files properties.")
(defvar tramp-cache-inhibit-cache nil
"Inhibit cache read access, when non-nil.")
(defcustom tramp-persistency-file-name (defcustom tramp-persistency-file-name
(cond (cond
;; GNU Emacs. ;; GNU Emacs.
...@@ -103,7 +106,7 @@ Returns DEFAULT if not set." ...@@ -103,7 +106,7 @@ Returns DEFAULT if not set."
(let* ((hash (or (gethash vec tramp-cache-data) (let* ((hash (or (gethash vec tramp-cache-data)
(puthash vec (make-hash-table :test 'equal) (puthash vec (make-hash-table :test 'equal)
tramp-cache-data))) 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) (gethash property hash default)
default))) default)))
(tramp-message vec 8 "%s %s %s" file property value) (tramp-message vec 8 "%s %s %s" file property value)
...@@ -182,8 +185,8 @@ If the value is not set for the connection, returns DEFAULT." ...@@ -182,8 +185,8 @@ If the value is not set for the connection, returns DEFAULT."
(aset key 3 nil)) (aset key 3 nil))
(let* ((hash (gethash key tramp-cache-data)) (let* ((hash (gethash key tramp-cache-data))
(value (if (hash-table-p hash) (value (if (hash-table-p hash)
(gethash property hash default) (gethash property hash default)
default))) default)))
(tramp-message key 7 "%s %s" property value) (tramp-message key 7 "%s %s" property value)
value)) value))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment