Re: Getting only latest X messages of a newsgroup
Chris Burdess <[email protected]> Mon, 31 Jul 2006 11:58:04 +0100
| Newsgroups | gmane.comp.java.classpath.extensions.discuss |
|---|---|
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1408642587== Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-1--57374373" Content-Transfer-Encoding: 7bit This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-1--57374373 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Cedric Hyppolite wrote: > I see two ways: > > - Get at most X latest articles: fetching the message headers using =20= > (last - X) or first -> last as the range in NNTPFolder.getMessages() > > - Get exactly the X latest articles: fetching the message headers =20 > using first -> last and keeping only the latest X messages > > Either way, the internal cache is used to prevent queries for =20 > previously downloaded messages. > Once the getMessages() returned the array of X recent messages, =20 > their full content can be downloaded using fetch(Message[], =20 > FetchProfile) > > There would be one property (for example =20 > 'mail.nntp.limittolatest' ) that states the number of messages to =20 > download at most or exactly. > This property should be read each time before being used so that a =20 > client could change the value before fetching each newsgroup. I kind of see where you're going with this, but doesn't it change the =20= semantics of getMessages? Wouldn't it be better just to concentrate =20 on optimising the range passed to xhdr, and instead manage the =20 messages' RECENT flags to indicate which ones were new in the last call? I'm not sure at all about returning fewer messages than are actually =20 present. --=20 =E7=8A=AC Chris Burdess "They that can give up essential liberty to obtain a little safety deserve neither liberty nor safety." - Benjamin Franklin --Apple-Mail-1--57374373-- --===============1408642587== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Classpathx-discuss mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpathx-discuss --===============1408642587==--