Symfony 2 cache warmup

In any case, to start the cache warm-up, replacing the location in the cache paths created using a special one.

for example, after starting

php console cache:warmup *..other args..* 

I get something like

 /home/user/code/xxx/... 

and I want to replace it

 /var/www/code/xxx/.... 

here is the task i did for ant

 <target name="warmup-cache"> <exec dir="${basedir}" executable="php" failonerror="true"> <arg line="app/console cache:warmup -a=name --env=prod "/> </exec> </target> 

I use apache ant to execute this command during build

now the generated cache has all the routes like / home / user / code / xxx / ...

and I want to rename all this cache data to / var / www / code / ...

+4
source share
1 answer

You can use the propertyregex task from ant -conrib tasks.

If you could provide a more accurate example, I could write a regex for you :)

+1
source

Source: https://habr.com/ru/post/1379645/


All Articles