Skip to content

Preserve Cache

When enabled, the preserve cache stores IDs of preserved messages so repeated runs can keep seeing items that would otherwise fall outside the fetched slice.

This matters most when you combine a limited fetch window with retention rules that need continuity across runs.

To understand the related flags first, see:

What is stored

In practice, that means the cache is about preserved items, not all fetched messages.

Why it exists

It is especially useful when:

Without the cache, repeated runs with a limited fetch window can stop “seeing” items that still matter to the preserve rules.

How the preserve flags work together

If you only use --preserve-last and fetch a wide enough recent window every time, preserve-cache is often unnecessary. It becomes much more important once --preserve-n and limited fetch windows enter the picture.

Dry-run behavior

--dry-run uses a separate preserve cache path by appending .dryrun.json to the active cache file.

See also