Re:Redis Lua scripting implemented: how to play with it.
by LeafStorm on Monday May 02, 2011 @01:26PM
(#2507037)
You could implement a forward-compatible database function table like this:
Any command without a function defined in the table would create a closure on the fly that calls that command like normal. (It also stores the closure in the table to speed up future calls.) Commands that could be implemented more elegantly using Lua semantics (like HMSET) have overrides defined in the db table directly, which prevents the closure-generating function from being called.
[ Parent
| on HN ]
There are no comments on this comment yet.