WICG / compression-dictionary-transport

Other
96 stars 8 forks source link

Dictionary expiration/lifetime #3

Closed pmeenan closed 1 year ago

pmeenan commented 1 year ago

If dictionaries end up scoped to a path and use some form of precedence, what are the mechanics for expiring a dictionary with more specificity for a less-specific one?

i.e., assuming dictionaries that cover 2 paths:

A - http://example.com/web/products/ B - http://example.com/

If a client has both dictionaries but a site decides to unify on a single global dictionary (B), how is dictionary A replaced? Some possibilities come to mind:

  1. When a dictionary with a path is fetched, the response can indicate if it overrides all child paths (deleting any dictionaries for paths under it).
  2. Just use regular cache expiration runes and dictionary A remains preferred until its cache lifetime expires.
yoavweiss commented 1 year ago

(1) seems preferable, as it gives developers a way to evict dictionaries from the cache. I'll add something to that effect.

pmeenan commented 1 year ago

The dictionaries now have an explicit expiration independent of the cache lifetime and the strict hierarchy is no longer a thing. This shouldn't be a critical problem and can be managed with relatively short TTL's on dictionaries (like with DNS rotation).