Always use the same environment, for web, command line, cronjobs...
Share stash cache across Symfony environments (prod / dev)
Either by using another Stash cache backend, or by setting Stash to use a shared cache folder that does not depend on the environment. In ezpublish.yml: