starling-0.1.0: A memcached client

Network.Starling.Core

Description

Primitives for the memcached protocol.

Synopsis

Documentation

requestOp :: Request -> OpCodeSource

Returns the operation the request will perform

set :: Key -> Value -> RequestSource

Set a value in the cache.

add :: Key -> Value -> RequestSource

Add a value to cache. Fails if already present.

replace :: Key -> Value -> RequestSource

Replaces a value in cahce. Fails if not present.

get :: Key -> RequestSource

Get a value from cache

incrementSource

Arguments

:: Key 
-> Word64

amount

-> Word64

initial value

-> Request 

decrementSource

Arguments

:: Key 
-> Word64

amount

-> Word64

initial value

-> Request 

append :: Key -> Value -> RequestSource

Appends the value to the value in the cache

prepend :: Key -> Value -> RequestSource

Prepends the value to the value in the cache

delete :: Key -> RequestSource

Delete a cache entry

flush :: RequestSource

Flush the cache

noop :: RequestSource

Keepalive. Flushes responses for quiet operations.

version :: RequestSource

Returns the server version

stat :: Maybe Key -> RequestSource

Fetch statistics about the cahce. Returns a sequence of responses.

addOpaque :: Opaque -> Request -> RequestSource

Add an opaque marker to a request. This is returned unchanged in the corresponding response.

addCAS :: CAS -> Request -> RequestSource

Add a version tag to a request. When added to a set/replace request, the request will fail if the data has been modified since the CAS was retrieved for the item.

getResponse :: Handle -> IO ResponseSource

Pulls a reponse to an operation off of a handle. May throw a StarlingReadError