S
S
Sergey2014-09-12 14:53:05
PHP
Sergey, 2014-09-12 14:53:05

How to setup cache in prod environment for download/update files?

When updating a file in Symfony2 in the prod environment, the uploaded file is not updated.
In the dev environment everything works fine. What could be the problem ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan, 2014-09-12
@0neS

It's not a bug, it's a feature.
What is the meaning of cache then?
You can clear the cache with the command app/console cache:clear -e=prod (or hardcore rm -rf app/cache/*).
In general, you can disable the cache in the prod environment by commenting out the $kernel->loadClassCache(); in app.php, but you don't need to do that.

S
Sergey, 2014-09-12
Protko @Fesor

The problem is that you must manually clear the production cache. Because it's a production environment. Development is done in dev environment (suddenly, right?), and then tests are run (in production or test environment), and then deployed. Ideally, you don’t need to use the local environment at all, but if you want, you can do it:
or if your project uses the Symfony3 directory structure, then
bin/console cache:clear --e=prod

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question