Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
an Erlang memcached client application
Erlang C++
tree: b059ab6095

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
make
Makefile
README.markdown

README.markdown

Description

mcache is an erlang memcached client application. It utilizes many new features to improve performance such as NIF (only from R13B03 on), dynamic compiling modules.

Usage

  1. Get a single key.
    mcache:get(Class, Key).
    

For example: mcache:get(my.friends, foobar) gets the key "my.friends:foobar"

Return values:

  • undefined, if key not found.
  • Value, any other values.

  1. Get multiple keys.
    mcache:mget(Class, [Key|_]).
    

Note: it gets all the keys with the same Class.

  1. Set a key and value.
    mcache:set(Class, Key, Value, Format, Expiry)
    

Format can be the following atoms:

  • raw, as iolist.
  • native, term_to_binary()
  • json, convert to json string (using an enhanced version of EEP0018)
  • int, data in <Int:32> format.

Expiry can be as follows:

  • default, uses ExpireConfig
  • infinity, no expiration
  • {X, seconds}, or minutes, hours, days, etc.
  • Integer, any numeric seconds.

This argument can be ignored. default is used in this case.

Something went wrong with that request. Please try again.