memcached
(require net/memcached) | package: memcached |
This package provides an interface to memcached.
1 Low level Interface
At the moment, only a low-level interface is provided.
procedure
(memcached-pool? x) → boolean?
x : any/c
procedure
(memcached ip port ... ...) → memcached-pool?
ip : string? port : (and/c exact-nonnegative-integer? (integer-in 1 65535))
This function should be modified to support UDP connections and its internals should be adapted to use all connections in the recommended way.
procedure
(memcached-get mp k) →
(or/c false/c value?) cas? mp : memcached-pool? k : key?
procedure
(memcached-set! mp k v [ #:expiration exp #:cas cas]) → (or/c false/c cas?) mp : memcached-pool? k : key? v : value? exp : uint4? = 0 cas : cas? = empty-cas
procedure
(memcached-add! mp k v [#:expiration exp]) → (or/c false/c cas?)
mp : memcached-pool? k : key? v : value? exp : uint4? = 0
procedure
(memcached-replace! mp k v [ #:expiration exp #:cas cas]) → (or/c false/c cas?) mp : memcached-pool? k : key? v : value? exp : uint4? = 0 cas : cas? = empty-cas
procedure
(memcached-delete! mp k [#:cas cas]) → boolean?
mp : memcached-pool? k : key? cas : cas? = empty-cas
procedure
(memcached-incr! k [ #:amount amt #:initial init #:expiration exp #:cas cas]) → (or/c false/c uint8?) k : key? amt : uint8? = 1 init : false/c = #f exp : uint4? = 0 cas : cas? = empty-cas
procedure
(memcached-decr! k [ #:amount amt #:initial init #:expiration exp #:cas cas]) → (or/c false/c uint8?) k : key? amt : uint8? = 1 init : false/c = #f exp : uint4? = 0 cas : cas? = empty-cas
These two functions have a more restrictive contract on the initial value than the API because I do not understand them enough to decide if the contract should be uint8? or value?.
procedure
(memcached-append! k v [#:cas cas]) → (or/c false/c cas?)
k : key? v : value? cas : cas? = empty-cas
procedure
(memcached-prepend! k v [#:cas cas]) → (or/c false/c cas?)
k : key? v : value? cas : cas? = empty-cas