mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 01:52:17 -05:00
_load_filaments memoizes the parsed catalog on the cache file's st_mtime alone. Two writes landing in the same mtime tick therefore look identical to the cache and the second one is never picked up -- the process keeps serving the stale parse until some later sync happens to change the stamp. The window is small on Linux, where st_mtime is nanosecond-resolution, but it is not theoretical: Spoolman's data directory is routinely a bind mount, and filesystems with 1-second mtime granularity are common there. A catalog refresh triggered close after another write would be silently dropped. Including st_size makes the key sensitive to any rewrite that changes length, which is the realistic shape of a catalog update.