Previously, caches were always written, and an error would cause the graph to close abruptly. This prevented services with read-only access to the cache from using the calculator.
The new behavior allows services to choose whether or not to write caches.
PiperOrigin-RevId: 561866791