Start here. This is the direct spoken answer to practice first.
Why this question matters
A cache value is still a contract. When deployments change object shape, old cached payloads can break requests or quietly return wrong data.
I would serialize a stable DTO or read model, not an arbitrary runtime object. The cached value should have a known shape, and the app should tolerate old or missing fields during deployments. A simple approach is to include a version in the key, such as product:v2:{id}, so a new release can read and write a new shape without deserializing old payloads.