hammer-editor/docs
Adam Brown 54fe6523e9
Configurable disk cache directory (#762)
The OG card and rendered story HTML caches were hard-coded to
hammer_data/cache. A [cache] block now sets the root directory and the
per-cache size bound, so an admin can move them to a scratch partition.

A configured directory resolves relative to the config file and is probed
for writability at startup: an unusable path aborts rather than degrading
to a permanent cache miss that just looks like a slow server.

* Close the gaps in cache directory validation

Validating after path resolution made the blank-directory guard dead: a
blank value resolves to the config file's own directory, which then looks
like a perfectly good absolute path, so the caches would land next to the
database instead of aborting. The cache block is now validated on the
parsed config, before resolution touches it.

The write probe only covered the cache root, but entries go in a
subdirectory per cache — a writable root holding a subdirectory owned by
someone else still degraded to a silent permanent cache miss, which is
the failure the probe exists to catch. Probing every subdirectory needs
their names in one place, so they move from string literals at the two
injection sites into a DiskCache enum.

Also: bound maxSizeMb, since a size given in bytes by mistake overflowed
the conversion into a negative cap that escaped the positive-value check;
collapse the 200 MB default to one definition; and read the e2e cache
helper's location from the config the server under test actually runs on.
2026-07-20 23:51:41 -07:00
..
ARCHITECTURE.md Cleanup some docs files 2026-06-20 00:12:28 -07:00
ASSET-GENERATION.md Add manifest-driven asset generation pipeline 2026-05-22 19:26:49 -07:00
DESIGN-PATTERNS.md Rename file to match pattern 2026-06-23 00:09:49 -07:00
HOW-TO-RELEASE.md Add "Server only" publish scope to prepareForRelease 2026-06-23 00:38:08 -07:00
HOW-TO-RUN-A-SERVER.md Configurable disk cache directory (#762) 2026-07-20 23:51:41 -07:00
ROADMAP.md Update ROADMAP.md to reflect completed tasks 2026-06-16 01:22:00 -07:00
SERVER-SECRET-STORAGE.md Update SERVER-SECRET-STORAGE.md for clarity on upgrades 2026-06-23 16:44:06 -07:00
STORY-IDEAS.md Story Ideas: account-level idea capture with sync (#720) 2026-07-05 01:49:04 -07:00
SYNCING-PROTOCOL.md Story Ideas: account-level idea capture with sync (#720) 2026-07-05 01:49:04 -07:00
WEB-DESIGN-SYSTEM.md CSS Refactor 2025-12-24 01:20:22 -08:00