Azhar Azhar - 2 months ago 21x
PHP Question

How reload twig cache in symfony2

I am new to PHP , I have a application which is developed in PHP and symfony2 framework.
I have changed html file , the change is not reflecting when i am refreshing the page.

01. I restarted the server No luck.

02. I tried to remove the twig folder from /protected/cache/ page it self not loading.

Kindly advise , I am using tomcat server to deploy.

Note : I don't have symfony2 command line configured on server.


The most simple way, type the command :

rm -rf app/cache/*

The point is: all files in app/cache/ can be removed freely, they are regenerated when needed.

If you really want to clear only twig cache :

rm -rf app/cache/<environment>/twig

Replace <environment> by dev, prod, or test according to your requirements.