Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: 38f57d8ffc3bc7…

This branch is 1 commit ahead, 5 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
README.rdoc
dynamic.rb
eval.lua

README.rdoc

Dynamically loading extensions into Tokyo Cabinet

Guide for loading extensions at runtime, instead of specifying them at startup time.

Extensions can be eval'ed at runtime. In this example we'll define and redefine a hello function.

Starting server with eval extension

> ttserver -ext eval.lua test.tch

Executing from command line

> tcrmgr ext localhost eval 'function hello() return "hello" end'
> tcrmgr ext localhost hello
  hello
> tcrmgr ext localhost eval 'function hello() return "bye" end'
> tcrmgr ext localhost hello
  bye

Executing via Ruby

> ruby dynamic.rb 
> hello
> bye
Something went wrong with that request. Please try again.