Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ddev robo cache:disable|enable #705

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mgurjanov
Copy link
Contributor

@mgurjanov mgurjanov commented Sep 5, 2024

#605

  • add new robo cache enable/disable commands

Note: I tested locally and I am getting cache HIT/MISS according to appropriate new command.

Example 1 Example 2 Example 3
ds_cache_enable1 ds_cache_disable ds_cache_enable1

TB: 3.4

@@ -71,4 +84,186 @@ public function __construct() {
}
}

/**
* Helper to get settings.local.php file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put all these into a trait, let's say DevelopmentTrait under robo-components. We decided to keep RoboFile minimal.

// Clear Drupal cache.
$this->taskExec('drush cr')->run();

$this->say("Drupal caching disabled.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do some file manipulations only, I'd try to verify it programmatically if the changes are truly effective and this way, we could do some error handling. Like doing some HTTP requests and check the headers or try to retrieve the config bits via the API, then we could have a conditional branch where we explain what went wrong and set a non-zero exit code. Same for the other direction.

@mgurjanov
Copy link
Contributor Author

@amitaibu In order to address PR review suggestions I'd need a TB bump.

@amitaibu
Copy link
Member

amitaibu commented Sep 7, 2024

Sure, Bump to 5h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants