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 cec510f5419793e3331c5dd97487764133e6e79e
tree aa689037031c3a4c362369bfc60477ffa112ce7c
parent 3cc1202c4939718b284799c29295608588f58bba
tree aa689037031c3a4c362369bfc60477ffa112ce7c
parent 3cc1202c4939718b284799c29295608588f58bba
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







