CakePHP生产部署要求我设置调试'2'

I am having an issue in my automated deployment where once the deployment is made, I get a 500 error unless I go into /app/Config/core.php and set the debug level to 2. I have read that this has to do with the cache.

When I deploy my site, I keep the app/tmp/cache folder and its permissions, but not its contents, and I figured this would be enough, but it is not. Any idea what I'm missing?

Make sure to keep your tmp/models and tmp/persistent folders. You can delete their contents, but leave the actual folders.