Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: b2b34fe52c
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (16 sloc) 0.623 kB

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
Jump to Line
Something went wrong with that request. Please try again.