I've often needed to pull a value from Memcached for troubleshooting. Since PHP serializes the array, it's hard to read the value through basic Memcached commands. This Drush command makes that much easier.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | memcache-add-drush-commands-1993170-6.patch | 4.7 KB | linvald |
| #3 | memcache-1993170-drush_get_command-3.patch | 1.55 KB | erikwebb |
| #1 | memcache-1993170-drush_get_command-1.patch | 1.57 KB | erikwebb |
Comments
Comment #1
erikwebb commentedComment #2
markpavlitski commentedThis looks like a very useful feature.
Is there any reason to call
dmemcache_get()twice rather than just using the$itemvariable?Since drush requires the corresponding module to be enabled, would it be better to attach this to memcache_admin module instead?
Comment #3
erikwebb commentedComment #4
erikwebb commentedI'm not sure we should attach this to memcache_admin, because personally I never use that module. Maybe there's some way we can get around this?
Let's finish the review of the code itself and then we can figure out the placement before committing anything.
Comment #5
erikwebb commentedI suppose this could probably be built generically for caches in general and suggested for Drush core.
Comment #6
linvald commentedHi
Reopening this ticket because i think these commands, stats and flush_all probably wont be available in a future generic drush cache implementation as these commands are Memcached specific.
The patch is different from the previous patches in that it doesn't implement cache get/set (as these are already available in https://github.com/drush-ops/drush/blob/6.x/commands/core/cache.drush.inc and https://github.com/drush-ops/drush/blob/7.x/commands/core/cache.drush.inc )
Comment #8
jeremy commentedReworked the code and committed. Also added documentation to README:
Comment #10
grahamvalue commentedIs there an estimate of when these commands will become available?
Thanks for the great work!
Comment #11
jeremy commentedYou can try it in https://www.drupal.org/project/memcache/releases/7.x-1.6-rc2 -- it will be included with the 7.x-1.6 release.
Comment #12
grahamvalue commentedThank you!