Expand description
Where write buffers and read caches are spooled.
Both the write path and the read path back their temp files with real disk,
never $TMPDIR: on most current Linux distros /tmp is a tmpfs, so spooling
a multi-gigabyte upload there fills RAM and gets the process stopped by the
OOM killer. The spool lives under the user’s cache directory instead.
The files stay unlinked (tempfile::tempfile_in), so a crash reclaims
their space with no cleanup pass and no leftovers.
Enums§
- Cache
Convention - Cache-directory convention to follow when no explicit spool dir is given.
Functions§
- prepare_
spool_ dir - Create the spool directory if needed and prove it’s writable.
- resolve_
spool_ dir - Resolve the spool directory from an optional override and the environment.
- spool_
dir_ from_ env - Resolve the spool directory from the live environment.