* elmo-pipe.el (elmo-pipe-drain): Bind `elmo-inhibit-read-cache' as t
authorteranisi <teranisi>
Wed, 7 Feb 2001 08:37:34 +0000 (08:37 +0000)
committerteranisi <teranisi>
Wed, 7 Feb 2001 08:37:34 +0000 (08:37 +0000)
 while moving messages.

* elmo2.el (elmo-read-msg): Don't use cache if `elmo-inhibit-read-cache'
 is non-nil.

* elmo-vars.el (elmo-inhibit-read-cache): New global switch.

elmo/ChangeLog
elmo/elmo-pipe.el
elmo/elmo-vars.el
elmo/elmo2.el

index b3cb77b..d8109c2 100644 (file)
@@ -1,3 +1,14 @@
+2001-02-07  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-pipe.el (elmo-pipe-drain): Bind `elmo-inhibit-read-cache' as t
+       while moving messages.
+
+       * elmo2.el (elmo-read-msg): Don't use cache if
+       `elmo-inhibit-read-cache' is non-nil.
+
+       * elmo-vars.el (elmo-inhibit-read-cache): New global switch.
+
+\f
 2001-01-30  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * elmo-util.el (elmo-folder-local-p): Treat pipe and filter.
index f17f9f9..633f952 100644 (file)
@@ -58,9 +58,7 @@
 
 (defun elmo-pipe-drain (src dst)
   "Move all messages of SRC to DST."
-  (let (elmo-nntp-use-cache
-       elmo-imap4-use-cache
-       elmo-pop3-use-cache ; Inhibit caching while moving messages.
+  (let ((elmo-inhibit-read-cache t); Inhibit caching while moving messages.
        elmo-pop3-use-uidl) ; No need to use UIDL
     (message "Checking %s..." src)
     (let ((srclist (elmo-list-folder src))
index 4866a6d..04dc565 100644 (file)
@@ -360,6 +360,9 @@ set as non-nil.")
 (defvar elmo-display-progress-threshold 20
   "*Displaying progress gauge if number of messages are more than this value.")
 
+(defvar elmo-inhibit-read-cache nil
+  "*Global switch to inhibit reading cache.")
+
 (require 'product)
 (product-provide (provide 'elmo-vars) (require 'elmo-version))
 
index cb21136..e96b6bc 100644 (file)
@@ -208,11 +208,12 @@ without cacheing."
 (defun elmo-read-msg (folder msg outbuf msgdb &optional force-reload)
   "Read message into outbuf."
   (let ((inhibit-read-only t))
+    (if elmo-inhibit-read-cache
     ;;Only use elmo-read-msg-with-cache, because if folder is network and
     ;;elmo-use-cache-p is nil, cannot read important msg. (by muse)
     ;;(if (not (elmo-use-cache-p folder msg))
-    ;;  (elmo-read-msg-no-cache folder msg outbuf)
-    (elmo-read-msg-with-cache folder msg outbuf msgdb force-reload)))
+       (elmo-read-msg-no-cache folder msg outbuf)
+      (elmo-read-msg-with-cache folder msg outbuf msgdb force-reload))))
 
 (defun elmo-read-msg-with-cache (folder msg outbuf msgdb
                                        &optional force-reload)