terminus icon indicating copy to clipboard operation
terminus copied to clipboard

What exactly is cleared with "env:clear-cache"

Open tlb420 opened this issue 7 years ago • 4 comments

Expected behavior

Per documentation, "Clears caches for the environment." Would like to know exactly what happens to avoid redundancy within shell scripts.

Actual behavior

Seems like this command issues the REDIS-CLI "FLUSHALL" command to the Redis cache server if Redis is enabled for a site, please confirm. If so, no need for us to use the REDIS-CLI to perform this function.

Seems like this command issues the WP-CLI "cache flush" command within a WordPress site, please confirm. If so, no need for us to use the "terminus remote:wp" command to perform this function.

Not sure if this command clears the WordPress transient cache, i.e. issuing the WP-CLI "wp transient delete --all" command, please confirm.

When issuing the "terminus remote:wp {site.env} -- transient delete --all" command the following warning is issued: Warning: Transients are stored in an external object cache, and this command only deletes those stored in the database. You must flush the cache to delete all transients. If the "env:clear-cache" command does delete WordPress transients, is the WordPress cache flushed afterward.

Any information on the sequence of the clearing of the caches within a WordPress site environment would be greatly appreciated.

tlb420 avatar Jul 26 '17 15:07 tlb420

@tlb420 This command only clears the framework's cache.

TeslaDethray avatar Aug 04 '17 03:08 TeslaDethray

Could we have clarification here or added to https://docs.pantheon.io/terminus/commands/env-clear-cache on what exactly this command does for Drupal-based sites vs doing a terminus drush sitename.env cache:rebuild?

davereid avatar Aug 22 '23 15:08 davereid

@rachelwhitton do you know?

Also, hi @davereid!

stevector avatar Aug 22 '23 19:08 stevector

I would also appreciate clarity for WordPress!

cbirdsong avatar Aug 29 '23 20:08 cbirdsong