• Resolved tomowow

    (@tomowow)


    We added a WP CLI command in our deploy script, so we don’t need to flush the cache manually after every edit.

    php wp-cli.phar w3-total-cache flush all

    This flushes the cache correctly, but also resets the page cache method. We use Redis, but after every deploy the method is set to Disk enhanced. How can we fix this? Already tried looking in cli.php if there is a command to change this setting after flushing, but no luck yet.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @tomowow

    Thank you for reaching out and I am happy to help!

    Well this is very strange and this should not be happening

    Is there any reason you are using php wp-cli.phar instead of just calling wp w3-total-cache flush all

    Thanks!

    Thread Starter tomowow

    (@tomowow)

    Hi Marko, we had some struggles with the installation of wp-cli on our server, therefore the wp command is undefined on our server at the moment. Because we need to do this step for every server, we decided to just use php wp-cli.phar for now. This does exactly the same as the wp command, so that can’t be the cause I guess.


    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @tomowow

    Thank you for your feedback.

    I cannot seem to replicate the problem, so this must be related to your server and the wp-cli installation.

    You can find more information about wp-cli commands in the W3 Total Cache in /wp-content/plugins/w3-total-cache/Cli.php

    I hope this helps!

    Thanks!

    Thread Starter tomowow

    (@tomowow)

    Hi Marko, we tried finding a cause on our server, but no success.

    While analysing, we notice that the Redis setting is removed from this plugin file after deploy: /home/forge/site.dev/client/assets/w3tc-config/master.php

    What we did now is execute a command that restores the Redis option after the flush with sed -i command.

    If you have any other ideas, let us know.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @tomowow

    The /w3tc-config/master.php is the configuration file. I’ve tried replicating this however, once i call wp w3-total-cache flush all the cache is purged, however, the caching method remains the same.

    Can you please share the screenshot of the Performance>Page Cache section?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Flushing cache programmatically resets cache engine’ is closed to new replies.