Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreas/ocaml-memcached
OCaml memcached client using core, async and bitstring.
https://github.com/andreas/ocaml-memcached
Last synced: 2 months ago
JSON representation
OCaml memcached client using core, async and bitstring.
- Host: GitHub
- URL: https://github.com/andreas/ocaml-memcached
- Owner: andreas
- Created: 2014-04-08T17:11:59.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-06T09:09:16.000Z (over 10 years ago)
- Last Synced: 2023-04-11T15:38:25.031Z (over 1 year ago)
- Language: OCaml
- Size: 207 KB
- Stars: 11
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
OCaml memcached client using [core](https://github.com/janestreet/core), [async](https://github.com/janestreet/async) and [bitstring](https://code.google.com/p/bitstring/).
## Example
```ocaml
open Core.Std
open Async.Stdmodule Ints = struct
type t = int
let to_string = string_of_int
let of_string = int_of_string
endmodule IntCache = Memcached.Make(Ints)
let main () =
IntCache.connect "localhost" 11212 >>= fun cache ->
IntCache.set cache "foo" 123 >>= fun result ->
IntCache.get cache "foo" >>= fun result ->
IntCache.close cache
in
main ();
Scheduler.go ()
```## Status
This project is work in progress.
Issues include:
- It hasn't been packaged up for OPAM yet.
- Insufficient handling of 32 bit ints from memcached.
- bitstring is currently a dependency. I'm considering getting rid of it or fix the string copying which is currently happening under the covers (`Bitstring.string_of_bitstring`).