Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:igrigorik/tokyo-recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed Jul 9, 2009
2 parents 64b3547 + 6cb03d7 commit 9d9ca5a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions expire/README.rdoc
@@ -1,9 +1,9 @@
= Auto record expire based on TTL = Auto record expire based on TTL


Implements TTL-based record expiry via a Lua script which is periodically executed by the TC runtime. 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 - 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 - 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. - 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 == Starting server
# call expire script every 5 seconds # call expire script every 5 seconds
Expand All @@ -15,5 +15,5 @@ Implements TTL-based record expiry via a Lua script which is periodically execut
> nil > nil
> {"name"=>"bob", "x"=>"1247025691"} > {"name"=>"bob", "x"=>"1247025691"}


Source: http://alpha.mixi.co.jp/blog/?p=862 - Source: http://alpha.mixi.co.jp/blog/?p=862
Source: http://alpha.mixi.co.jp/blog/?p=318 - Source: http://alpha.mixi.co.jp/blog/?p=318

0 comments on commit 9d9ca5a

Please sign in to comment.