The cl-memcached Reference Manual

This is the cl-memcached Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 04:14:28 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-memcached

Fast, thread-safe library to interface with the Memcached Object Cache.

Author

quasi <>

License

MIT

Version

1.0.0

Dependencies
  • usocket (system).
  • split-sequence (system).
  • babel (system).
  • pooler (system).
Source

cl-memcached.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-memcached/cl-memcached.asd

Source

cl-memcached.asd.

Parent Component

cl-memcached (system).

ASDF Systems

cl-memcached.


3.1.2 cl-memcached/packages.lisp

Source

cl-memcached.asd.

Parent Component

cl-memcached (system).

Packages

cl-memcached.


3.1.3 cl-memcached/cl-memcached.lisp

Dependency

packages.lisp (file).

Source

cl-memcached.asd.

Parent Component

cl-memcached (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-memcached

Source

packages.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *mc-default-encoding*

Default encoding

Package

cl-memcached.

Source

cl-memcached.lisp.

Special Variable: *mc-use-pool*

Default value for the MC-USE-POOL keyword parameter in memcached functions

Package

cl-memcached.

Source

cl-memcached.lisp.

Special Variable: *memcache*

Represents a particular Memcached server

Package

cl-memcached.

Source

cl-memcached.lisp.


5.1.2 Ordinary functions

Function: make-memcache (&key ip port name pool-size)

Creates an instance of class MEMCACHE which represents a memcached server

Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-add (key data &key memcache timeout flags noreply external-format mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-append (key data &key memcache timeout flags noreply external-format mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Reader: mc-bytes (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

bytes.

Function: mc-cas (key data cas-unique &key memcache timeout flags noreply external-format mc-use-pool)

Check And Set Operation : Store this data buy only if no one else has updated since I last fetched it

Package

cl-memcached.

Source

cl-memcached.lisp.

Reader: mc-cas-unique (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

cas-unique.

Function: mc-data (response &key external-format)
Package

cl-memcached.

Source

cl-memcached.lisp.

Reader: mc-data-raw (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

data-raw.

Function: mc-decr (key &key value noreply memcache mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-del (key &key noreply memcache mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Reader: mc-flags (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

flags.

Function: mc-flush-all (&key delay noreply memcache mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-get (keys-list &key memcache mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-get+ (key-or-list-of-keys &key memcache mc-use-pool)

Takes a key or a list of keys are returns a list of MEMCACHE-RESPONSE structures

Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-get-value (key &key memcache mc-use-pool external-format)

A utility macro to query a key and return a external-format decoded string

Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-incr (key &key value noreply memcache mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Reader: mc-key (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

key.

Function: mc-prepend (key data &key memcache timeout flags noreply external-format mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-replace (key data &key memcache timeout flags noreply external-format mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-set (key data &key memcache timeout flags noreply external-format mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-stats (&key memcache mc-use-pool)

Returns an ALIST of stats data from memcached server

Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-stats-summary (&key memcache)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-store (key data &key memcache command timeout flags noreply cas-unique mc-use-pool)

Stores data in the memcached server using the :command command.
KEY => KEY by which the DATA is stored. this is of type SIMPLE-STRING
DATA => DATA to be stored into the cache. DATA has to be a sequence of TYPE (UNSIGNED-BYTE 8).
MEMCACHE => A structure representing the MEMCACHE we want to use.
command => The storage command we want to use. There are 5 available : set, add, replace, append & prepend. timeout => The time in seconds when this data expires. 0 is never expire.
flags =>
noreply => server does not send a reply
mc-use-pool => use connection from pool (much faster for load)

response :
- ’STOREDrn’, to indicate success.
- ’NOT_STOREDrn’ to indicate the data was not stored, but not
because of an error. This normally means that the
condition for an ’add’ or a ’replace’ command wasn’t met.
- ’EXISTSrn’ to indicate that the item you are trying to store with
a ’cas’ command has been modified since you last fetched it.
- ’NOT_FOUNDrn’ to indicate that the item you are trying to store
with a ’cas’ command did not exist.

Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-touch (key expiry-time &key noreply memcache mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-verbosity (&key level noreply memcache mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: mc-version (&key memcache mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.


5.1.3 Standalone methods

Method: print-object ((object memcache) stream)
Source

cl-memcached.lisp.

Method: print-object ((object memcache-response) stream)
Source

cl-memcached.lisp.


5.2 Internals


5.2.1 Constants

Constant: +crlf+
Package

cl-memcached.

Source

cl-memcached.lisp.

Constant: +mc-end+
Package

cl-memcached.

Source

cl-memcached.lisp.


5.2.2 Special variables

Special Variable: +command-encoding+
Package

cl-memcached.

Source

cl-memcached.lisp.


5.2.3 Macros

Macro: mc-make-command (command)
Package

cl-memcached.

Source

cl-memcached.lisp.

Macro: mc-with-pool-y/n ((memcache use-pool stream) &body body)
Package

cl-memcached.

Source

cl-memcached.lisp.


5.2.4 Ordinary functions

Function: cl-mc-error (format-control &rest format-arguments)

Signals an error of type TRIPR-SIMPLE-ERROR with the provided format control and arguments.

Package

cl-memcached.

Source

cl-memcached.lisp.

Function: close-memcache-connection (connection)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: copy-memcache (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: copy-memcache-response (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: make-memcache% (name ip port pool-size)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: make-memcache-response% (key flags bytes cas-unique data-raw)
Package

cl-memcached.

Source

cl-memcached.lisp.

Reader: mc-ip (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

ip.

Reader: mc-name (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

name.

Reader: mc-pool (instance)
Writer: (setf mc-pool) (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

pool.

Reader: mc-pool-size (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

pool-size.

Reader: mc-port (instance)
Package

cl-memcached.

Source

cl-memcached.lisp.

Target Slot

port.

Function: mc-quick-test (&key memcache mc-use-pool)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: memcache-p (object)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: memcache-response-p (object)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: new-memcache-connection (memcache)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: read-line-from-binary-stream (stream)
Package

cl-memcached.

Source

cl-memcached.lisp.

Function: server-request (command-param-list &key cas-unique noreply)
Package

cl-memcached.

Source

cl-memcached.lisp.


5.2.5 Conditions

Condition: cl-mc-condition

Superclass for all conditions related to CL-MC.

Package

cl-memcached.

Source

cl-memcached.lisp.

Direct superclasses

condition.

Direct subclasses

cl-mc-error.

Condition: cl-mc-error

Superclass for all errors related to CL-MC.

Package

cl-memcached.

Source

cl-memcached.lisp.

Direct superclasses
Direct subclasses

memcached-server-unreachable.

Condition: memcached-server-unreachable
Package

cl-memcached.

Source

cl-memcached.lisp.

Direct superclasses

cl-mc-error.


5.2.6 Structures

Structure: memcache
Package

cl-memcached.

Source

cl-memcached.lisp.

Direct superclasses

structure-object.

Direct methods

print-object.

Direct slots
Slot: name
Type

simple-string

Initform

"memcache"

Readers

mc-name.

Writers

This slot is read-only.

Slot: ip
Type

simple-string

Initform

"127.0.0.1"

Readers

mc-ip.

Writers

This slot is read-only.

Slot: port
Type

fixnum

Initform

11211

Readers

mc-port.

Writers

This slot is read-only.

Slot: pool-size
Type

fixnum

Initform

20

Readers

mc-pool-size.

Writers

This slot is read-only.

Slot: pool
Readers

mc-pool.

Writers

(setf mc-pool).

Structure: memcache-response
Package

cl-memcached.

Source

cl-memcached.lisp.

Direct superclasses

structure-object.

Direct methods

print-object.

Direct slots
Slot: key
Type

simple-string

Initform

""

Readers

mc-key.

Writers

This slot is read-only.

Slot: flags
Initform

""

Readers

mc-flags.

Writers

This slot is read-only.

Slot: bytes
Type

fixnum

Initform

0

Readers

mc-bytes.

Writers

This slot is read-only.

Slot: cas-unique
Initform

""

Readers

mc-cas-unique.

Writers

This slot is read-only.

Slot: data-raw
Type

(array (unsigned-byte 8))

Readers

mc-data-raw.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   F   M   N   P   R   S  
Index Entry  Section

(
(setf mc-pool): Private ordinary functions

C
cl-mc-error: Private ordinary functions
close-memcache-connection: Private ordinary functions
copy-memcache: Private ordinary functions
copy-memcache-response: Private ordinary functions

F
Function, (setf mc-pool): Private ordinary functions
Function, cl-mc-error: Private ordinary functions
Function, close-memcache-connection: Private ordinary functions
Function, copy-memcache: Private ordinary functions
Function, copy-memcache-response: Private ordinary functions
Function, make-memcache: Public ordinary functions
Function, make-memcache%: Private ordinary functions
Function, make-memcache-response%: Private ordinary functions
Function, mc-add: Public ordinary functions
Function, mc-append: Public ordinary functions
Function, mc-bytes: Public ordinary functions
Function, mc-cas: Public ordinary functions
Function, mc-cas-unique: Public ordinary functions
Function, mc-data: Public ordinary functions
Function, mc-data-raw: Public ordinary functions
Function, mc-decr: Public ordinary functions
Function, mc-del: Public ordinary functions
Function, mc-flags: Public ordinary functions
Function, mc-flush-all: Public ordinary functions
Function, mc-get: Public ordinary functions
Function, mc-get+: Public ordinary functions
Function, mc-get-value: Public ordinary functions
Function, mc-incr: Public ordinary functions
Function, mc-ip: Private ordinary functions
Function, mc-key: Public ordinary functions
Function, mc-name: Private ordinary functions
Function, mc-pool: Private ordinary functions
Function, mc-pool-size: Private ordinary functions
Function, mc-port: Private ordinary functions
Function, mc-prepend: Public ordinary functions
Function, mc-quick-test: Private ordinary functions
Function, mc-replace: Public ordinary functions
Function, mc-set: Public ordinary functions
Function, mc-stats: Public ordinary functions
Function, mc-stats-summary: Public ordinary functions
Function, mc-store: Public ordinary functions
Function, mc-touch: Public ordinary functions
Function, mc-verbosity: Public ordinary functions
Function, mc-version: Public ordinary functions
Function, memcache-p: Private ordinary functions
Function, memcache-response-p: Private ordinary functions
Function, new-memcache-connection: Private ordinary functions
Function, read-line-from-binary-stream: Private ordinary functions
Function, server-request: Private ordinary functions

M
Macro, mc-make-command: Private macros
Macro, mc-with-pool-y/n: Private macros
make-memcache: Public ordinary functions
make-memcache%: Private ordinary functions
make-memcache-response%: Private ordinary functions
mc-add: Public ordinary functions
mc-append: Public ordinary functions
mc-bytes: Public ordinary functions
mc-cas: Public ordinary functions
mc-cas-unique: Public ordinary functions
mc-data: Public ordinary functions
mc-data-raw: Public ordinary functions
mc-decr: Public ordinary functions
mc-del: Public ordinary functions
mc-flags: Public ordinary functions
mc-flush-all: Public ordinary functions
mc-get: Public ordinary functions
mc-get+: Public ordinary functions
mc-get-value: Public ordinary functions
mc-incr: Public ordinary functions
mc-ip: Private ordinary functions
mc-key: Public ordinary functions
mc-make-command: Private macros
mc-name: Private ordinary functions
mc-pool: Private ordinary functions
mc-pool-size: Private ordinary functions
mc-port: Private ordinary functions
mc-prepend: Public ordinary functions
mc-quick-test: Private ordinary functions
mc-replace: Public ordinary functions
mc-set: Public ordinary functions
mc-stats: Public ordinary functions
mc-stats-summary: Public ordinary functions
mc-store: Public ordinary functions
mc-touch: Public ordinary functions
mc-verbosity: Public ordinary functions
mc-version: Public ordinary functions
mc-with-pool-y/n: Private macros
memcache-p: Private ordinary functions
memcache-response-p: Private ordinary functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods

N
new-memcache-connection: Private ordinary functions

P
print-object: Public standalone methods
print-object: Public standalone methods

R
read-line-from-binary-stream: Private ordinary functions

S
server-request: Private ordinary functions