-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9079fb3
commit 9ab57f8
Showing
4 changed files
with
80 additions
and
18 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
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
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,16 @@ | ||
#!/bin/bash | ||
|
||
echo 'Provide the site name (e.g. your-awesome-site), then press [ENTER]:'; | ||
read SITE; | ||
|
||
echo 'Provide the site name (multidev, dev, test, or live), then press [ENTER]:'; | ||
read ENV; | ||
|
||
# Get a list of all cache tables | ||
CACHETABLES="$(terminus drush $SITE.$ENV -- sql:query "SHOW TABLES LIKE 'cache%';")" | ||
|
||
# Trucate each cache table in a loop to avoid resource contention and potential deadlocks. | ||
|
||
for table in $CACHETABLES; do | ||
terminus drush $SITE.$ENV -- sql:query "TRUNCATE TABLE $table;" | ||
done |
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,16 @@ | ||
#!/bin/bash | ||
|
||
echo 'Provide the site name (e.g. your-awesome-site), then press [ENTER]:'; | ||
read SITE; | ||
|
||
echo 'Provide the site name (multidev, dev, test, or live), then press [ENTER]:'; | ||
read ENV; | ||
|
||
# Get a list of all cache tables | ||
CACHETABLES="$(terminus wp $SITE.$ENV -- db query "SHOW TABLES LIKE 'cache%';")" | ||
|
||
# Trucate each cache table in a loop to avoid resource contention and potential deadlocks. | ||
|
||
for table in $CACHETABLES; do | ||
terminus wp $SITE.$ENV -- db query "TRUNCATE TABLE $table;" | ||
done |