MMLiNK
A paper chit in red ink: MMLiNK, tokens chit, its first word example, the other three hidden, with a stub to keep.

Your chit

These four words are your chit. Anyone who sees them can spend its tokens.

tokens

left on the chit in this browser tab. A report uses one token; continuing a report uses one tenth of a token for each additional file retrieved.

No chit in this browser tab. Enter one:

Get a chit: a few are given away free each day, or $5 buys one with 50 tokens.

Your chit stays in this browser tab only, and goes only to MMLiNK. MMLiNK keeps a hash of it, never the words. What is a chit?

How MMLiNK caches

00

How MMLiNK caches

MMLiNK keeps a cache, like every browser does. When a site says a response can be reused for a while, MMLiNK reuses it instead of asking again; when that time is up, it asks the site whether anything changed.

This page sets out exactly when it does each, and the two places it’s stricter than the rules require. The rules are RFC 9111, HTTP Caching, for a shared cache: one cache for everyone who uses MMLiNK. Wherever a report mentions the cache, its words link here.

01

What goes through the cache

The cache answers plain GET requests: the URL you give MMLiNK, each redirect it follows, and the files a continued report fetches. Each hop is stored on its own. RFC 9111 §2

Some requests always go to the site: any method but GET; a request with conditions of its own (a Range, or an If-None-Match or If-Modified-Since you set); and every Also prove follow-up, since its whole point is to ask the site.

A hop answered from the cache sends nothing, so it doesn’t count against MMLiNK’s limit on requests to any one site.

02

Answered from the cache

While a stored response is fresh, MMLiNK answers from it and sends nothing to the site. The report shows the response exactly as it came in, with an Age field worked out as RFC 9111 §4.2.3 says.

A box at the top of the hop says it came from the cache: when the response was stored, how long it stays fresh, and by which rule. The connection, TLS, certificates, DNS and timing it shows are from the fetch that stored it, and say so. A verdict that rests on the wire, like time to first byte, describes that earlier fetch. RFC 9111 §4

03

How long a response stays fresh

A response stays fresh for as long as its own fields say, read in this order:

  • Cache-Control: no-cache means never fresh: MMLiNK checks with the site every time.
  • s-maxage, which speaks to shared caches like MMLiNK’s, then max-age: that many seconds.
  • Expires: the time from the response’s Date to its Expires date.

A response with none of these isn’t fresh at all, except where MMLiNK may guess (next section). RFC 9111 §4.2.1

04

When the site doesn’t say

When a site gives no freshness rule, RFC 9111 §4.2.2 lets a cache guess one. The usual guess, and MMLiNK’s, is a tenth of the time since the response’s Last-Modified date, and only for the status codes RFC 9110 §15.1 lists as cacheable that way (200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414 and 501).

MMLiNK guesses only for the files a continued report fetches for itself, which rarely change. It never guesses for the URL you asked about, so a page you’ve just changed is never answered from an old copy on a guess.

05

Checking a stale response with the site

A stale response with a validator (an ETag or a Last-Modified date) is still worth keeping. Next time, MMLiNK sends the site a conditional request: a GET with If-None-Match (the ETag) or If-Modified-Since (the date). RFC 9111 §4.3.1

If nothing changed, the site answers 304 Not Modified with no content. MMLiNK keeps the stored content and updates its header fields from the 304, as RFC 9111 §4.3.4 says. If the site sends a full response instead, that replaces what was stored.

Either way the connection, TLS and timing are read live, and the report shows the conditional request and what came back.

06

What MMLiNK never stores

MMLiNK stores a response only when the site allows it and it’s complete. It never stores:

  • a response marked no-store or private;
  • a response to anything but a GET, a status below 200, a 206 Partial Content or a 304;
  • a response that was cut short;
  • a response whose Vary is *;
  • a response with no rule for how long it may be kept: no max-age, s-maxage, Expires or public, and no status code that allows a guess;
  • a response that sets a cookie. RFC 9111 §7.3 allows storing these; MMLiNK doesn’t, so it never hands one person a cookie a site gave to someone else’s report.
  • a response too big for the cache as a whole.

RFC 9111 §3

07

What counts as the same request

A stored response answers only a request that would have gone out exactly the same: from the same fetching machine, with the same method and URL, and with every request field you can set the same (Accept, Accept-Language, Accept-Encoding and your User-Agent text).

That’s stricter than RFC 9111 §4.1, which asks only that the fields a response’s Vary names match. A report shows the request that was sent beside the response that came back, so the two must belong together. MMLiNK honours Vary on top of that, and a Vary of * never matches.

MMLiNK’s own name in its User-Agent, which changes with each new version, is left out of the match unless the response’s Vary names User-Agent, so a new version doesn’t empty the cache.

08

Ignoring the cache

Every browser lets you skip its cache with a forced reload, and so does MMLiNK: tick Ignore MMLiNK’s cache on the report form. Every hop then goes to the site as a plain GET, with no If-None-Match or If-Modified-Since, and what comes back replaces what was stored.

A report that ignores the cache uses a token like any other, and counts against the limit on requests to any one site.

09

How long a stored response is kept

MMLiNK keeps a stored response for as long as it’s useful, and never longer than 3 days:

  • a fresh response, until it stops being fresh;
  • a stale one with an ETag or Last-Modified date, up to 3 days, since the site can still say it hasn’t changed;
  • a stale one with neither is deleted when it stops being fresh: the next request has to fetch it all again anyway.

The cache holds at most 2 GiB. When it fills up, MMLiNK deletes early: first anything no longer useful, then stale responses with a validator, least recently used first, then fresh ones, those that would go stale soonest first. A restart of the server empties the cache.

10

Privacy

Each stored response is encrypted on disk under a key of its own, and the keys live only in memory, as reports’ do. The file names are a keyed hash that says nothing about the URL. The cache keeps nothing about who asked.

The cache is shared by everyone who uses MMLiNK, which keeps the load on sites down, since many people try the same few URLs. Its one cost: a report answered from the cache tells you someone fetched that URL through MMLiNK in the last 3 days, possibly you. It never says who. RFC 9111 §7.2

11

DNS answers

The DNS answers in a report come from MMLiNK’s own resolver, which keeps each answer for as long as its TTL says and asks again when that runs out. The report shows how many seconds each answer has left in that cache. RFC 1034 §6.2.1

That’s a separate cache from the one above: it holds DNS answers, not responses.

12

Tokens

A report answered from the cache uses a token, as any report does. The token pays for reading the response and writing the report, and that’s the same work either way.

Contents ↑