Guys, can we create a new command:
cache on/off
I am constantly switching on/off my mysql caches and it is the most visited page lately...
If such a request gets some support from the community I am ready to share my ideas for the exact syntax....
PS. In another thread we should discuss the general strategy of making drush more like a faster UI for the Drupal system - I mean - sooner or later drush will have all functions that the drupal frontend has... Do you realize this?
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | cache_enable_disable_drush_commands-3.patch | 3.49 KB | rbayliss |
| #7 | cache_enable_disable_drush_commands-2.patch | 3.38 KB | rbayliss |
| #4 | cache_enable_disable_drush_commands.patch | 2.17 KB | rbayliss |
Comments
Comment #1
moshe weitzman commentedi suggest using sql query command to disable query cache. drupal page cache maybe disabled with new vset command. it might make sense to add a specific cache related command - not sure.
Comment #2
moshe weitzman commentedlets rely on vset for now.
Comment #3
doublejosh commentedFor other folks who might be wondering like I was...
drush vset cache 0Then choose 1.
Comment #4
rbayliss commentedFunny this issue got bumped recently. I wrote some shortcut commands for enabling and disabling the different caches a couple weeks ago and have found myself using them a lot. I hate to revive a dead issue, but this simple functionality saves a lot of time during development. I think this patch should cover it if you'd like to reconsider.
Comment #5
greg.1.anderson commentedDidn't test yet, but the code looks good. I'm in favor of committing this here, but if moshe doesn't want it, I'll take it in drush_extras.
Comment #6
msonnabaum commentedI could go either way on this functionality, but it's incomplete as is. Page cache isn't on/off, there are 3 potential values there (4 if you're on pressflow), so those should be represented as well.
Comment #7
rbayliss commentedThanks for the feedback. Rerolled the patch to have an option for page cache, and also to be more flexible in how variables and values are specified. I'm looking at the negative value devel module's devel_rebuild_theme_registry as an example of where this could be useful. Also, I'm not sure what level of support Drush wants to maintain for Pressflow, but using 'external' for a page cache option will currently work.
Comment #8
msonnabaum commentedMaybe you could check if the CACHE_EXTERNAL constant is defined and only display it then?
Comment #9
rbayliss commentedGood idea. It's not a display issue, since it's an option, but I don't think anything good would come of a non-pressflow site being set to cache external.
Comment #10
moshe weitzman commentedThis actually looks pretty nice to me now. Needs unit tests. See the /tests directory for examples.
Comment #11
rsvelko commentedhooray - I knew it on August 28, 2009 at 6:30pm :) !
Comment #12
robloachCould this be one command rather than two? The drush command listing is getting rather large. Something like the following? That would also save you the wrapper functions.
Might be good to liste the types of caches available to enable/disable (page, block, css, js, etc).
Comment #13
doublejosh commentedAny thoughts about a:
cache-disable -aggressive, which would disable all possible cache variables?Comment #14
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.
Comment #15
Konstantin Komelin commentedNow we may use:
drush vset --exact cache 0