-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Description
@fbourigault has done a great job in order to Reduce class discriminator overhead with Symfony 4 (#28889). Nevertheless, it would be nice if $discriminatorCache implements PSR-6 cache. Cache will be populate on the first request and all other requests, will use the cache.
class ObjectNormalizer extends AbstractObjectNormalizer
{
protected $propertyAccessor;
/** Replace array by a PSR-6 implementation */
private $discriminatorCache = array();
public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyAccessorInterface $propertyAccessor = null, PropertyTypeExtractorInterface $propertyTypeExtractor = null, ClassDiscriminatorResolverInterface $classDiscriminatorResolver = null)
{
...
}
Do you think it is a good idea to work on this feature ?