From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37454 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Cache/Agent unification Date: Sat, 04 Aug 2001 13:17:43 +0200 Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035172867 13995 80.91.224.250 (21 Oct 2002 04:01:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:01:07 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 16910 invoked from network); 4 Aug 2001 11:16:25 -0000 Original-Received: from dolk.extundo.com (195.42.214.242) by gnus.org with SMTP; 4 Aug 2001 11:16:25 -0000 Original-Received: from barbar.josefsson.org (slipsten.extundo.com [195.42.214.241]) (authenticated) by dolk.extundo.com (8.11.3/8.11.3) with ESMTP id f74BGRw03712 for ; Sat, 4 Aug 2001 13:16:27 +0200 Original-To: ding@gnus.org Mail-Copies-To: nobody User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.104 Original-Lines: 59 Xref: main.gmane.org gmane.emacs.gnus.general:37454 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37454 After reading some gnus-cache.el code I have some ideas, namely: * Gnus Cache should cache all NOV headers. (Unless disabled.) Right now it only cache NOV headers for cached articles. But caching all NOV headers would increase speed when entering groups, which I think would be nice. Header caching should only be enabled (per default) for backends that doesn't have their own local NOV files, i.e nntp. An interface should be added which lets gnus-cache use the backends' NOV file if it has one, this would be used for nnml, nnfolder, nnimap. (The nnimap NOV cache might be removed once gnus-cache handles this though.) Implementation detail: gnus-cache currently "braids" NOV lines. This turned out to be too inefficient in nnimap, but you can take the same approach nnimap did -- always maintain a contiguous NOV file. So if you've cached NOV for article 50-100 and Gnus wants NOV for article 1000 you fetch NOV for 101-1000 and saves that. * Gnus Agent should use the NOV file from the cache/backend instead of maintaining its own. Enabling the agent thus enables NOV caching of gnus-cache. This removes all the (duplicte) NOV stuff in gnus-agent. If someone see a problem with this, please tell me. * The Agent stores its articles in the cache. I see one problem with this change. Currently, someone may have their cache on a remote filesystem to preserve space in the client. The separation between the cache and the agent makes this posssible. I'm not sure how serious this objection is. Please comment. Also please think of other things this might break. * Articles should be inserted into the Agent (cache) when you read (or prefetch) them. Of course subject to any agent predicates. * Articles should be retrieved from the cache if available by default. Currently you need to frob `gnus-use-cache' to get this behaviour. Summary/article commands which jog the cache should be available. Some indication in the article modeline should be present to indicate where the article comes from (cache or backend). * Finally apply my old patches to make the Agent consider read articles as well. Currently the agent is hardcoded to never download read articles. When you use Gnus Agent as a disconnected mail client, you kind of expect everything in the group to be available (perhaps except very long articles). The scope of all these changes are, I think, to make the agent/cache a integrated part of Gnus. It shouldn't require any configuration to take advantage of the Agent. All backends should be "part" of the agent/cache program per default. For remote backends, articles should be saved per default (perhaps not? It requires lots of disk space).