Subject: [Rfc-markdown] 1.3.36: new: kramdown-rfc-cache-i-d-bibxml

From: Carsten Bormann <[email-masked]>
Date: Tue, 23 Feb 2021 22:08:06 +0100

TL;DR: You don’t need the below.
But it can make you faster and work better while offline.

Grüße, Carsten

Many of us have been using rsync to get copies of the bibxml files on xml2rfc.tools.ietf.org so we did not have to wait for kramdown-rfc to fetch updates.  However, datatracker currently does not offer rsyncing, so you couldn’t get the bibxml3 directory right from the horse’s mouth.

Now you can.  1.3.36 comes with a new command:

kramdown-rfc-cache-i-d-bibxml

This does a cache preload: it sends copies of the bibxml for all active(*) I-Ds (both numbered and up-to-date references) to your KRAMDOWN_REFCACHEDIR.

(The environment variable KRAMDOWN_REFCACHEDIR should point to ~/.cache/xml2rfc to share a cache between xml2rfc and kramdown-rfc.  If it is not set at all, you will be warned, but the command will happily proceed with that default.  Kramdown-rfc still defaults to ./.refcache, though, so it won’t find the cache...)

The command is rather expensive(**) on the first call (initial pull), but quite efficient after that (update pull).

You could put the invocation into your crontab.  Even though it’s quite fast, it is probably not worth calling it more than once an hour, because the all_id2.txt file on which it builds currently isn’t refreshed more often.

kramdown-rfc-cache-i-d-bibxml is not for everyone: it needs at least 2016’s Ruby 2.4 (***) and an install of the gem "net-http-persistent" (not installed as a requirement by default, as it may be problematic on some older platforms).

(*) So kramdown-rfc’s existing caching engine will take care of your very few references to outdated I-Ds referenced by version number and expired I-Ds.

(**) including for datatracker itself — it makes some 3600 HTTP requests in a row on an initial pull.  So don’t do that 20 minutes before the I-D deadline — be prepared, and only do update pulls in times of I-D frenzy.
[And now you know why I'm pushing this update a day after the I-D deadline :-)]

(***) If you have a Mac, and are using the system Ruby, this means it works on Catalina and higher.  We do prefer using a homebrew-installed Ruby in any case.