cache:clear

 if you get this kind of shit:

require(): Failed opening required 'app/cache/prod/doctrine/orm/Proxies/__CG__cgswebsdBundleEntityCategoria.php' (include_path='.:/usr/share/php:/usr/share/pear') in vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php on line 92


so if you remove entirely the cache/prod:

Run "app/console cache:warmup --env=prod --no-debug".
Running cache:clear does the cache warming by default (i.e. when you don't add the --no-warmup option).

 see the discussion:
 -------------

Well normally he shouldn't have to run this command, the kernel should trigger the cache warming if the cached container doesn't exists (which is the case when you delete the entire folder).
Maybe it's because of a configuration of php, avoiding to detect that the cached container doesn't exists, apc.stat for example.


---------------
The kernel only triggers some cache warmers, not all of them. The commands run them all (by default).
Btw, if you go live without running the cache warming, you will not apply some of the optimizations done by the cache warming (for instance caching the resolution of template names)


评论

热门帖子