Example:
'foo' => \DI\object()
->constructor(DI\factory(
function (ContainerInterface $c) {
return ...;
}
));
DI\object() is cacheable, but it contains a non-serializable nested definition.
CacheableDefinition will probably need to be removed and replaced with an method in Definition, e.g. isCacheable().