Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
OCaml client for the Redis advanced key-value store
OCaml Ruby
branch: master

Merge remote branch 'wagerlabs/unified_request_protocol' into wagerla…

…bs-unified_request_protocol

Conflicts:
	src/redis.ml
	tests/smoke_test.ml
latest commit 16b921c5cd
@rgeoghegan authored
Failed to load latest commit information.
src
tests Merge remote branch 'wagerlabs/unified_request_protocol' into wagerla…
.gitignore Updated copyright to 2011
LICENSE.txt Editing readme in preperation of merge to trunk
Makefile oasis build system and ounit tests
README.md Editing readme in preperation of merge to trunk
_oasis oasis build system and ounit tests
_tags oasis build system and ounit tests
configure oasis build system and ounit tests
myocamlbuild.ml
redis.conf Editing readme in preperation of merge to trunk
setup.ml oasis build system and ounit tests

README.md

Redis client library for Ocaml

ocaml-redis implements the client spec of the Redis key-value store. This version is aimed to be compatible with Redis 2.2, and is not compatible with earlier versions.

Example Usage

>> let conn = Redis.create_connection ()
in
begin
    Redis.lpush "redis" "works" conn;
    Redis.lpush "redis" "fast" conn;
    Redis.lpush "redis" "simple" conn;
    List.map Redis.string_of_bulk_data
        (Redis.lrange "redis" 0 2 conn);
end;;
["simple"; "fast"; "works"]

Building

To build the library,

rake library

should do the trick. From there, you will have to statically link build/redis.cmx, build/redis.cmo and build/redis.cmi with your code.

Testing

To run all the unit tests, execute:

rake test

To run a simple smoke test on a redis server you do not mind completely wiping running on your localhost, execute:

rake smoke_test

Todo

See the issue tracker

Something went wrong with that request. Please try again.