Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Reuse canonical serializers in cache recovery
Generate rebuilt payloads with the same entity serializer as publication, including transformed titles, images and nested fields; avoid copying a different teaser shape by hand.
Bad example
| 1 | const payload = { title: teaser.title, image: teaser.image }; |
Explanation (EN)
Generate rebuilt payloads with the same entity serializer as publication, including transformed titles, images and nested fields; avoid copying a different teaser shape by hand.
Objašnjenje (HR)
Generate rebuilt payloads with the same entity serializer as publication, including transformed titles, images and nested fields; avoid copying a different teaser shape by hand.
Good example
| 1 | const payload = entity.asWidgetPayload(); |
Explanation (EN)
Reuse canonical serializers in cache recovery
Objašnjenje (HR)
Reuse canonical serializers in cache recovery
Notes (EN)
Generate rebuilt payloads with the same entity serializer as publication, including transformed titles, images and nested fields; avoid copying a different teaser shape by hand.
Bilješke (HR)
Primijeniti pri promjenama cachea, fallbacka i obrade skupova podataka.
Exceptions / Tradeoffs (EN)
Distinct endpoint representations may have separate serializers, but each cache entry must honor its own representation.
Iznimke / Tradeoffi (HR)
Distinct endpoint representations may have separate serializers, but each cache entry must honor its own representation.