Function: gnus-agent-flush-cache

gnus-agent-flush-cache is an interactive and byte-compiled function defined in gnus-agent.el.gz.

Signature

(gnus-agent-flush-cache)

Documentation

Flush the agent's index files such that the group no longer appears to have any local content. The actual content, the article files, is then deleted using gnus-agent-expire-group. The gnus-agent-regenerate-group method provides an undo mechanism by reconstructing the index files from the article files.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-agent.el.gz
(defun gnus-agent-flush-cache ()
  "Flush the agent's index files such that the group no longer
appears to have any local content.  The actual content, the
article files, is then deleted using gnus-agent-expire-group.
The gnus-agent-regenerate-group method provides an undo mechanism
by reconstructing the index files from the article files."
  (interactive)
  (save-excursion
    (let ((file-name-coding-system nnmail-pathname-coding-system))
      (while gnus-agent-buffer-alist
	(set-buffer (cdar gnus-agent-buffer-alist))
	(let ((coding-system-for-write gnus-agent-file-coding-system))
	  (write-region (point-min) (point-max)
			(gnus-agent-article-name ".overview"
						 (caar gnus-agent-buffer-alist))
			nil 'silent))
	(setq gnus-agent-buffer-alist (cdr gnus-agent-buffer-alist)))
      (while gnus-agent-group-alist
	(with-temp-file (gnus-agent-article-name
			 ".agentview" (caar gnus-agent-group-alist))
	  (princ (cdar gnus-agent-group-alist))
	  (insert "\n")
	  (princ 1 (current-buffer))
	  (insert "\n"))
	(setq gnus-agent-group-alist (cdr gnus-agent-group-alist))))))