Skip to content

Suggestion: Cache generation/warming for static caches. #8639

Discussion options

You must be logged in to vote

Yes, this is something you can automate. Symfony for example does this in their Doctrine integration.

The way to go would be something like this:

$metadatas = $entityManager->getMetadataFactory()->getAllMetadata(); // this will create cache entries for all metadata

$entityManager->getProxyFactory()->generateProxyClasses(
    $metadata, 
    $entityManager->getConfiguration()->getProxyDir()
);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by michaeldnelson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #8637 on April 18, 2021 14:54.