Saturday, March 12, 2022

[FIXED] Symfony: Clear doctrine cache

Issue

I need to clear my doctrine's cache in Symfony.

There must be some way in command line for clear the cache.

Or where should I find and delete the files belonging to cache?


Solution

For Symfony 3+:

 php bin/console

will list all commands, the following are relevant for cache:

 php bin/console doctrine:cache:clear-metadata 
 php bin/console doctrine:cache:clear-query  
 php bin/console doctrine:cache:clear-result

Before Symfony 3:

app/console

will list how you can do it

 app/console doctrine:cache:clear-metadata 
 app/console doctrine:cache:clear-query  
 app/console doctrine:cache:clear-result 


Answered By - amitchhajer

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.