File: tramp-cache.el.html
An implementation of information caching for remote files.
Each connection, identified by a tramp-file-name structure or by
a process, has a unique cache. We distinguish 4 kind of caches,
depending on the key:
- localname is nil. These are reusable properties. Examples:
"remote-shell" identifies the POSIX shell to be called on the
remote host, or "perl" is the command to be called on the remote
host when starting a Perl script. These properties are saved in
the file tramp-persistency-file-name.
- localname is a string. These are temporary properties, which are
related to the file localname is referring to. Examples:
"file-exists-p" is t or nil, depending on the file existence, or
"file-attributes" caches the result of the function
file-attributes. These entries have a timestamp, and they
expire after remote-file-name-inhibit-cache seconds if this
variable is set.
- The key is a process. These are temporary properties related to
an open connection. Examples: "scripts" keeps shell script
definitions already sent to the remote shell, "last-cmd-time" is
the time stamp a command has been sent to the remote process.
- The key is nil. These are temporary properties related to the
local machine. Examples: "parse-passwd" and "parse-group" keep
the results of parsing "/etc/passwd" and "/etc/group",
"{uid,gid}-{integer,string}" are the local uid and gid, and
"locale" is the used shell locale.
- The key is tramp-cache-undefined. All functions return the
expected values, but nothing is cached.
Some properties are handled special:
- "process-name", "process-buffer" and "first-password-request" are
not saved in the file tramp-persistency-file-name, although
being connection properties related to a tramp-file-name
structure.
- Reusable properties, which should not be saved, are kept in the
process key retrieved by tramp-get-process (the main connection
process). Other processes could reuse these properties, avoiding
recomputation when a new asynchronous process is created by
make-process. Examples are "unsafe-temporary-file",
"remote-path", "device" (tramp-adb.el) or "share" (tramp-gvfs.el).
Defined variables (6)
tramp-cache-data | Hash table for remote files properties. |
tramp-cache-data-changed | Whether persistent cache data have been changed. |
tramp-cache-read-persistent-data | Whether to read persistent data at startup time. |
tramp-cache-undefined | The symbol marking undefined hash keys and values. |
tramp-connection-properties | List of static connection properties. |
tramp-persistency-file-name | File which keeps connection history for Tramp connections. |
Defined functions (17)
tramp-cache-print | (TABLE) |
tramp-connection-property-p | (KEY PROPERTY) |
tramp-dump-connection-properties | () |
tramp-flush-connection-properties | (KEY) |
tramp-flush-connection-property | (KEY PROPERTY) |
tramp-flush-directory-properties | (KEY DIRECTORY) |
tramp-flush-file-function | () |
tramp-flush-file-properties | (KEY FILE) |
tramp-flush-file-property | (KEY FILE PROPERTY) |
tramp-flush-file-upper-properties | (KEY FILE) |
tramp-get-connection-property | (KEY PROPERTY DEFAULT) |
tramp-get-file-property | (KEY FILE PROPERTY DEFAULT) |
tramp-get-hash-table | (KEY) |
tramp-list-connections | () |
tramp-parse-connection-properties | (METHOD) |
tramp-set-connection-property | (KEY PROPERTY VALUE) |
tramp-set-file-property | (KEY FILE PROPERTY VALUE) |