-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DP-16759: Resolve issue with cache tags not being cleared at end of r…
…elease (#43) * DP-16759: Downgrade Drush to 9 (#41) * DP-16759: Downgrade Drush to 9 * Resolve PHPCS warning that came out of nowhere * Backport cache:tags command for temporary use * Add changelog * Move to a class without a validation handler * Extend DrushCommands
- Loading branch information
Showing
4 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Write your changelog entry here. Every PR must have a changelog. | ||
# | ||
# You can use the following types: | ||
# Added: For new features. | ||
# Changed: For changes to existing functionality. | ||
# Deprecated: For soon-to-be removed features. | ||
# Removed: For removed features. | ||
# Fixed: For any bug fixes. | ||
# Security: In case of vulnerabilities. | ||
# | ||
# The format is crucial. Please follow the examples below exactly. For reference, the requirements are: | ||
# * All 3 parts are required: you must include type, description, and issue. | ||
# * Type must be left aligned and followed by a colon. | ||
# * Description must be indented 2 spaces. | ||
# * Issue must be indented 4 spaces. | ||
# * Issue should include just the Jira ticket number, not a URL. | ||
# * No extra spaces, indents, or blank lines are allowed. | ||
# | ||
# Fixed: | ||
# - description: Fixes scrolling on edit pages in Safari. | ||
# issue: DP-13314 | ||
# | ||
# You may add more than 1 description & issue for each type. Use the following format: | ||
# Changed: | ||
# - description: Automating the release branch. | ||
# issue: DP-10166 | ||
# - description: Second change item that needs a description. | ||
# issue: DP-19875 | ||
# - description: Third change item that needs a description along with an issue. | ||
# issue: DP-19843 | ||
Fixed: | ||
- description: ma:deploy erroring during cache clearing | ||
issue: DP-16759 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Write your changelog entry here. Every PR must have a changelog. | ||
# | ||
# You can use the following types: | ||
# Added: For new features. | ||
# Changed: For changes to existing functionality. | ||
# Deprecated: For soon-to-be removed features. | ||
# Removed: For removed features. | ||
# Fixed: For any bug fixes. | ||
# Security: In case of vulnerabilities. | ||
# | ||
# The format is crucial. Please follow the examples below exactly. For reference, the requirements are: | ||
# * All 3 parts are required: you must include type, description, and issue. | ||
# * Type must be left aligned and followed by a colon. | ||
# * Description must be indented 2 spaces. | ||
# * Issue must be indented 4 spaces. | ||
# * Issue should include just the Jira ticket number, not a URL. | ||
# * No extra spaces, indents, or blank lines are allowed. | ||
# | ||
# Fixed: | ||
# - description: Fixes scrolling on edit pages in Safari. | ||
# issue: DP-13314 | ||
# | ||
# You may add more than 1 description & issue for each type. Use the following format: | ||
# Changed: | ||
# - description: Automating the release branch. | ||
# issue: DP-10166 | ||
# - description: Second change item that needs a description. | ||
# issue: DP-19875 | ||
# - description: Third change item that needs a description along with an issue. | ||
# issue: DP-19843 | ||
Fixed: | ||
- description: Downgrade Drush to fix sitemap and massdocs cron tasks. | ||
issue: DP-16759 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Drush\Commands; | ||
|
||
use Drupal\Core\Cache\Cache; | ||
use Drush\Utils\StringUtils; | ||
|
||
class CacheBackportCommands extends DrushCommands { | ||
|
||
/** | ||
* Invalidate by cache tags. | ||
* | ||
* Note: This is a temporary backport of a Drush 10 feature. | ||
* Remove when we go to Drush 10. | ||
* | ||
* @command cache:tags | ||
* @param string $tags A comma delimited list of cache tags to clear. | ||
* @aliases ct | ||
* @bootstrap full | ||
* @usage drush cache:tag node:12,user:4 | ||
* Purge content associated with two cache tags. | ||
*/ | ||
public function tags($tags) | ||
{ | ||
$tags = StringUtils::csvToArray($tags); | ||
Cache::invalidateTags($tags); | ||
$this->logger()->success(dt("Invalidated tag(s): !list.", ['!list' => implode(' ', $tags)])); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters