Data Types in Redis

Redis support 5 data types. You need to know what type of value that key maps to, as for each data type, the command to retrieve it is different. Commands to retrieve key value: * String: * GET <key> * Hash: * HGETALL <key> * List: * LRANGE <key> <start> <end> * Set: * SMEMBERS <key> * Sorted set: * ZRANGEBYSCORE <key> <min> <max> To check the type of value a key mapping to: * TYPE <key>


redis - WRONGTYPE Operation against a key holding the wrong kind of value php - Stack Overflow #redis

Tags: redis