mirror of
https://github.com/Darkrock-Studios/hammer-editor.git
synced 2026-08-05 23:59:46 +00:00
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. |
||
|---|---|---|
| .. | ||
| ARCHITECTURE.md | ||
| ASSET-GENERATION.md | ||
| DESIGN-PATTERNS.md | ||
| HOW-TO-RELEASE.md | ||
| HOW-TO-RUN-A-SERVER.md | ||
| ROADMAP.md | ||
| SERVER-SECRET-STORAGE.md | ||
| STORY-IDEAS.md | ||
| SYNCING-PROTOCOL.md | ||
| WEB-DESIGN-SYSTEM.md | ||