]> gitweb.factorcode.org Git - factor.git/blob - extra/memcached/memcached-docs.factor
Support Link Time Optimization (off by default)
[factor.git] / extra / memcached / memcached-docs.factor
1 ! Copyright (C) 2010 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license
3
4 USING: help.syntax help.markup io.sockets math memcached
5 quotations sequences strings ;
6
7 IN: memcached
8
9 HELP: memcached-server
10 { $var-description
11     "Holds an " { $link inet } " object with the address of "
12     "an Memcached server."
13 } ;
14
15 HELP: with-memcached
16 { $values { "quot" quotation } }
17 { $description
18     "Opens a network connection to the " { $link memcached-server }
19     " and runs the specified quotation."
20 } ;
21
22 HELP: m/get
23 { $values { "key" string } { "val" string } }
24 { $description
25     "Gets a single key."
26 } ;
27
28 HELP: m/set
29 { $values { "val" string } { "key" string } }
30 { $description
31     "Sets a single key to a particular value, whether the item "
32     "exists or not."
33 } ;
34
35 HELP: m/add
36 { $values { "val" string } { "key" string } }
37 { $description
38     "Adds an item only if the item does not already exist. "
39     "If the item already exists, throws an error."
40 } ;
41
42 HELP: m/replace
43 { $values { "val" string } { "key" string } }
44 { $description
45     "Replaces an item only if it already eixsts. "
46     "If the item does not exist, throws an error."
47 } ;
48
49 HELP: m/delete
50 { $values { "key" string } }
51 { $description
52     "Deletes an item."
53 } ;
54
55 HELP: m/append
56 { $values { "val" string } { "key" string } }
57 { $description
58     "Appends the value to the specified item."
59 } ;
60
61 HELP: m/prepend
62 { $values { "val" string } { "key" string } }
63 { $description
64     "Prepends the value to the specified item."
65 } ;
66
67 HELP: m/incr
68 { $values { "key" string } { "val" string } }
69 { $description
70     "Increments the value of the specified item by 1."
71 } ;
72
73 HELP: m/incr-val
74 { $values { "amt" string } { "key" string } { "val" string } }
75 { $description
76     "Increments the value of the specified item by the specified amount."
77 } ;
78
79 HELP: m/decr
80 { $values { "key" string } { "val" string } }
81 { $description
82     "Decrements the value of the specified item by 1."
83 } ;
84
85 HELP: m/decr-val
86 { $values { "amt" string } { "key" string } { "val" string } }
87 { $description
88     "Decrements the value of the specified item by the specified amount."
89 } ;
90
91 HELP: m/version
92 { $values { "version" string } }
93 { $description
94     "Retrieves the version of the " { $link memcached-server } "."
95 } ;
96
97 HELP: m/noop
98 { $description
99     "Used as a keep-alive. Also flushes any outstanding quiet gets."
100 } ;
101
102 HELP: m/stats
103 { $values { "stats" sequence } }
104 { $description
105     "Get various statistics about the " { $link memcached-server } "."
106 } ;
107
108 HELP: m/flush
109 { $description
110     "Deletes all the items in the cache now."
111 } ;
112
113 HELP: m/flush-later
114 { $values { "seconds" integer } }
115 { $description
116     "Deletes all the items in the cache sometime in the future."
117 } ;
118
119 HELP: m/quit
120 { $description
121     "Close the connection to the " { $link memcached-server } "."
122 } ;