This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 1fdaf47a1fcf7a77e721379b1efa9cc0a510f72f
tree 07fb4b09ad70f2428769a4079c7916db8ebc76f8
parent cec510f5419793e3331c5dd97487764133e6e79e
tree 07fb4b09ad70f2428769a4079c7916db8ebc76f8
parent cec510f5419793e3331c5dd97487764133e6e79e
tokyo-recipes / expire
| name | age | message | |
|---|---|---|---|
| .. | |||
| |
README.rdoc | Tue Jul 07 21:58:33 -0700 2009 | |
| |
expire.lua | Tue Jul 07 21:06:14 -0700 2009 | |
| |
expire.rb | Tue Jul 07 21:06:14 -0700 2009 |
expire/README.rdoc
Auto record expire based on TTL
Implements TTL-based record expiry via a Lua script which is periodically executed by the TC runtime.
- The calling period is customizable via -extpc flag
- Data is stored inside a ‘table’ engine where key ‘x’ stores the unix timestamp for the expiry date
- Lua cleanup script is called periodically to scan the database for keys ready to be removed, which are then purged from the DB.
Starting server
# call expire script every 5 seconds > ttserver -ext expire.lua -extpc expire 5 "casket.tct#idx=x:dec#bnum=2000000"
Executing via Ruby
> ruby expire.rb
> nil
> {"name"=>"bob", "x"=>"1247025691"}
- Source: alpha.mixi.co.jp/blog/?p=862
- Source: alpha.mixi.co.jp/blog/?p=318







