Get redis hash data via cli
redis
Solution
Besides the key you will need to specify the field in the HGET command.
To get a list of all fields in the hash you can run this:
hkeys ff3169bd93659dc31322abc32835ef3e:cache_my_custom_cache:custom_cache_markup
Then you can do:
hget ff3169bd93659dc31322abc32835ef3e:cache_my_custom_cache:custom_cache_markup FIELD
You can also get all the values in the hash like this:
hvals ff3169bd93659dc31322abc32835ef3e:cache_my_custom_cache:custom_cache_markup
Problem
I've been experimenting with Redis today. I've managed to store cached values from Drupal, but I'm looking to investigate a bit further and view the value stored in `cache_my_custom_cache`.. ``` 127.0.0.1:6379> keys * 1) "ff3169bd93659dc31322abc32835ef3e:cache_bootstrap:lookup_cache" 2) "ff3169bd93659dc31322abc32835ef3e:cache_bootstrap:module_implements" 3) "ff3169bd93659dc31322abc32835ef3e:cache_bootstrap:bootstrap_modules" 4) "ff3169bd93659dc31322abc32835ef3e:cache_bootstrap:system_list" 5) "ff3169bd93659dc31322abc32835ef3e:cache_bootstrap:variables" 6) "ff3169bd93659dc31322abc32835ef3e:path:a:und" 7) "myhash" 8) "ff3169bd93659dc31322abc32835ef3e:path:s:und" 9) "ff3169bd93659dc31322abc32835ef3e:cache_my_custom_cache:custom_cache_markup" 10) "ff3169bd93659dc31322abc32835ef3e:cache_bootstrap:hook_info" ``` ``` 127.0.0.1:6379> type ff3169bd93659dc31322abc32835ef3e:cache_my_custom_cache:custom_cache_markup hash ``` - this reveals it's of type hash.. But when I run: ``` 127.0.0.1:6379> HGET ff3169bd93659dc31322abc32835ef3e:cache_qbe:qbe_markup (error) ERR wrong number of arguments for 'hget' command ``` It doesn't like it! Completely new to this, can someone offer a solution?