From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37461 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Cache/Agent unification Date: Sat, 04 Aug 2001 14:30:25 +0200 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035172873 14027 80.91.224.250 (21 Oct 2002 04:01:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:01:13 +0000 (UTC) Cc: ding@gnus.org Return-Path: Return-Path: Original-Received: (qmail 17444 invoked from network); 4 Aug 2001 12:29:07 -0000 Original-Received: from dolk.extundo.com (195.42.214.242) by gnus.org with SMTP; 4 Aug 2001 12:29:06 -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 f74CT9w04020; Sat, 4 Aug 2001 14:29:10 +0200 Original-To: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Sat, 04 Aug 2001 14:00:04 +0200") Mail-Copies-To: nobody User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.104 Original-Lines: 51 Xref: main.gmane.org gmane.emacs.gnus.general:37461 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37461 Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes: > * Currently, the cache is being used to keep articles around even > after they've expired from the server. But for disconnected > operation, you expect the local cache to be a more-or-less exact > mirror of the server state. Hence, for disconnected operation you > want local copies to disappear when they disappear from the server. I think the cache should store everything ever entered to it (modulo some expiring mechanism to free disk space). The Agent use marks and a active range to identify which articles exists on the server or not. Really-cached articles (that possibly doesn't exist on the server) are marked as such as well. The point is that storing everything in the same directory is OK and saves space comparing to having two directories with almost the same content. All this assumes backends never re-use article numbers, of course. I think we could introduce a uidvalidity-like concept in the cache system fairly easily, if some backends wants to renumber articles. (Nnimap could invalidate the cache directory when uidvalidity changes.) OTOH backends that renumber articles are hard to cache in any useful way so maybe we shouldn't bother. > * You're right about the disk space requirements. Maybe really old > articles shouldn't be in the local cache. Hm. > > Maybe it would be enough to provide a couple of commands to add > articles to the cache and to remove them. Examples: > > - Add each article as it is read. > - Add all articles visible in the current summary buffer. > - Add all unread articles. > - Remove old, read, articles. > - Never cache this group. > - Always cache all articles from that group. Yes, some of these are good. But it shouldn't be too manual, it would be nice if the agent just did things automatically based on what you've told it. It should be possible to indicate how much disk space you want to waste on a general level. Three levels seems like a good start: * Cache nothing * Cache headers, and manually entered (cache or agent) articles * Cache everything Maybe the variable could support regexp's as well, indicating which level should apply to each group. Group parameters could be used as well. IMHO and just thinking out loud, of course.