Repository navigation
Re-render a JPEG's derivatives when its creator or rights change - #4
Merged
Merged
Conversation
…, F-16) Every derivative carries the creator and rights its sidecar names. The cache key held the sidecar only for a RAW, which is developed from it; for a JPEG it was the settings hash alone, and the photo id is the hash of the original, which a sidecar edit does not touch. Correcting a copyright line therefore hit a complete cache entry and kept the old line, in files named for their bytes that a host may cache forever. The key now includes the stamped creator and rights. A photograph that stamps nothing keeps its existing key and its cache. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…enders-jpegs # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every derivative is stamped with the creator and rights from the photograph's sidecar (F-16). The derivative cache key included the sidecar only for a RAW, which is developed from it. For a JPEG the key was the settings hash alone, and the photo id is the hash of the original, which a sidecar edit does not change.
So correcting a copyright line in a JPEG's
.xmphit a complete cache entry and kept the old line, in files named for their bytes that a host may cache forever.The key now includes the stamped creator and rights (
renderKeyFor). A photograph that stamps nothing keeps its existing key and cache; the RAW key is unchanged.Tests (no external tools needed): key differs per creator/rights, fields do not run together, RAW key still follows its sidecar, and
derivePhotodoes not serve a seeded cache entry after the rights change.Effect on users: photographs with a creator or rights are rendered once more on the next build. Bytes are the same, so names and deployed files are unchanged unless the bytes differ.
Each PR adds a line under
Unreleased/Fixedin CHANGELOG.md, so merging several will conflict there; keep every line.🤖 Generated with Claude Code