Commit a2d921a6 authored by David Kågedal's avatar David Kågedal
Browse files

* prefetch.el (lyskom-prefetch-texttree-handler): Anropa

lyskom-prefetch-texttree med t som tredje argument.
(lyskom-prefetch-texttree): Nytt tredje argument som gör att den
inte prefetchar redan hämtade texter.
parent d5dae21c
......@@ -209,13 +209,19 @@ lyskom-prefetch-stack."
(lyskom-continue-prefetch))
(defun lyskom-prefetch-texttree (text-no &optional queue)
(defun lyskom-prefetch-texttree (text-no &optional queue only-new)
"Prefetch all info about the text with number TEXT-NO and descends recursively.
If QUEUE is non-nil, put the request on it, otherwise put it on
lyskom-prefetch-stack."
(if queue
(lyskom-queue-enter queue (cons 'TEXTTREE text-no))
(lyskom-stack-push lyskom-prefetch-stack (cons 'TEXTTREE text-no)))
lyskom-prefetch-stack.
If ONLY-NEW is non-nil and the text-stat in question is already
prefetched the prefetch is not done."
(if (and only-new
(cache-get-text-stat text-no))
nil
(if queue
(lyskom-queue-enter queue (cons 'TEXTTREE text-no))
(lyskom-stack-push lyskom-prefetch-stack (cons 'TEXTTREE text-no))))
(lyskom-continue-prefetch))
......@@ -560,9 +566,9 @@ Put the requests on QUEUE."
(eq type 'CC-RECPT))
(lyskom-prefetch-conf (misc-info->recipient-no misc) queue))
((eq type 'COMM-IN)
(lyskom-prefetch-texttree (misc-info->comm-in misc) queue))
(lyskom-prefetch-texttree (misc-info->comm-in misc) queue t))
((eq type 'FOOTN-IN)
(lyskom-prefetch-texttree (misc-info->footn-in misc) queue))
(lyskom-prefetch-texttree (misc-info->footn-in misc) queue t))
((eq type 'COMM-TO)
(lyskom-prefetch-textauth (misc-info->comm-to misc) queue))
((eq type 'FOOTN-TO)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment