Variable: remote-file-name-inhibit-cache
remote-file-name-inhibit-cache is a customizable variable defined in
files.el.gz.
Value
10
Documentation
Whether to use the remote file-name cache for read access.
When nil, never expire cached values (caution). When t, never use the cache (safe, but may be slow). A number means use cached values for that amount of seconds since caching.
The attributes of remote files are cached for better performance. If they are changed outside of Emacs's control, the cached values become invalid, and must be reread. If you are sure that nothing other than Emacs changes the files, you can set this variable to nil.
If a remote file is checked regularly, it might be a good idea to let-bind this variable to a value less than the interval between consecutive checks. For example:
(defun display-time-file-nonempty-p (file)
(let ((remote-file-name-inhibit-cache (- display-time-interval 5)))
(and (file-exists-p file)
(< 0 (file-attribute-size
(file-attributes (file-chase-links file)))))))
This variable was added, or its default value changed, in Emacs 24.1.
Probably introduced at or before Emacs version 24.1.
Source Code
;; Defined in /usr/src/emacs/lisp/files.el.gz
(defcustom remote-file-name-inhibit-cache 10
"Whether to use the remote file-name cache for read access.
When nil, never expire cached values (caution).
When t, never use the cache (safe, but may be slow).
A number means use cached values for that amount of seconds since caching.
The attributes of remote files are cached for better performance.
If they are changed outside of Emacs's control, the cached values
become invalid, and must be reread. If you are sure that nothing
other than Emacs changes the files, you can set this variable to nil.
If a remote file is checked regularly, it might be a good idea to
let-bind this variable to a value less than the interval between
consecutive checks. For example:
(defun display-time-file-nonempty-p (file)
(let ((remote-file-name-inhibit-cache (- display-time-interval 5)))
(and (file-exists-p file)
(< 0 (file-attribute-size
(file-attributes (file-chase-links file)))))))"
:group 'files
:version "24.1"
:type '(choice
(const :tag "Do not inhibit file name cache" nil)
(const :tag "Do not use file name cache" t)
(integer :tag "Do not use file name cache"
:format "Do not use file name cache older then %v seconds"
:value 10)))