https://bugzilla.wikimedia.org/show_bug.cgi?id=60563

Ori Livneh <o...@wikimedia.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |o...@wikimedia.org

--- Comment #4 from Ori Livneh <o...@wikimedia.org> ---
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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to