(tramp-message key 8 "%s %s %s" file property value)
(when (>= tramp-verbose 10)
(let* ((var (intern (concat "tramp-cache-get-count-" property)))
- (val (or (and (boundp var) (symbol-value var)) 0)))
+ (val (or (and (boundp var) (symbol-value var))
+ (progn
+ (add-hook 'tramp-unload-hook
+ (lambda () (makunbound var)))
+ 0))))
(set var (1+ val))))
value))
(tramp-message key 8 "%s %s %s" file property value)
(when (>= tramp-verbose 10)
(let* ((var (intern (concat "tramp-cache-set-count-" property)))
- (val (or (and (boundp var) (symbol-value var)) 0)))
+ (val (or (and (boundp var) (symbol-value var))
+ (progn
+ (add-hook 'tramp-unload-hook
+ (lambda () (makunbound var)))
+ 0))))
(set var (1+ val))))
value))