Ori Livneh <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #4 from Ori Livneh <> ---
You could uses hashes. RedisBagOStuff::set would perform:

    $redis->hMset( $key, array( 'type' => gettype( $value ), 'value' => $value
) );

RedisBagOStuff::get would use $redis->hmGet( $key, array( 'type', 'value' ) )
and cast as needed.

Hash fields can be incremented atomically using either HINCRBYFLOAT or HINCRBY.
We could decline to type-check, on the principle of GIGO.

If we pick this approach, we should be careful and make sure the overhead is
acceptable. The Redis documentation provides some cause for optimism, though:
"A hash with a few fields (where few means up to one hundred or so) is stored
in a way that takes very little space, so you can store millions of objects in
a small Redis instance."

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to