Tim Bond
July 20 2017
user:123
or page:456
Use case: Instagram needed a quick way to get the user ID for a given media ID
Answer:
How do you want to look it up?
Neither does serialization!
$foo = new stdClass();
$foo->bar = 'baz';
$redis->set('foo_obj', $foo);
var_dump($redis->get('foo_obj'));
string(6) "Object"
json_encode()
serialize()
igbinary_serialize()