Skip to content

crestxu/redis-triggle

 
 

Repository files navigation

Where to find complete Redis documentation?
-------------------------------------------
Redis-triggle command

triggleadd dbid trigglename triggleevent scripts

triggle events include two types events: 
(1) before cmds exec, use cmds+ing eg: deling,seting,hseting,etc....
(2) after cmd exec, use cmds+ed eg: deled,seted,hseted,etc......
scripts use lua 
(1) include the basic lua functions
(2) include the redis.call(cmds)
(3) include the redis.log
for example
"
local id=Redis.call('get',KEYS[1])
if id~=nil then
    Redis.call('publish','system',id);
end
in the redis triggle system KEYS can be the cmds when call the related triggle,
eg, when then cmd "set foo 123" calls triggles, the KEYS[1]='set' KEYS[2]=foo KEY[3]=123
or use the delete_expire triggle (special triggle when the key expired from redis), KEYS[1]="expired key"

triggllist dbid trigglename
view the triggle detail

triggledel dbid trigglename
del the triggle



crestxu@gmail.com 
6/9/2012
---------
Enjoy!

About

Redis-triggle is a redis branch add the triggle system in to redis, triggles create by lua script

http://crestxu.github.com/redis-triggle

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 81.2%
  • Tcl 15.9%
  • Ruby 1.4%
  • Other 1.5%