Lines Matching refs:to
7 (configurable) port; clients connect to that port, send commands to
10 There is no need to send any command to end the session. A client may
12 however, that clients are encouraged to cache their connections rather
13 than reopen them every time they need to store or retrieve data. This
14 is because memcached is especially designed to work very efficiently
19 compared to this).
24 wants to store or retrieve data. The server will transmit back
37 will be provided with) to determine where the data block ends, and not
48 clients wouldn't need to use such long keys); the key must not include
57 "prepend" and "cas") ask the server to store some data identified by a
62 Retrieval commands ("get", "gets", "gat", and "gats") ask the server to
63 retrieve data corresponding to a set of keys (one or more keys in one
65 requested keys; after that for each item the server finds it sends to
85 well as a flag system to make the commands flexible rather than having a
89 Meta flags are not to be confused with client bitflags, which is an opaque
94 existing commands continue to work. The meta commands will not replace
127 arguments to 'P' and 'L' can be used as hints or path specifications to a
131 token to a memcached daemon, which will ignore them.
143 (relative to an item or to an operation requested by the client) to
149 that, the server will consider it to be real Unix time value rather
169 doesn't conform to the protocol in some way. <error> is a
176 of severe server errors, which make it impossible to continue
179 case in which the server closes a connection to a client.
222 "append" means "add this data to an existing key after existing data".
224 "prepend" means "add this data to an existing key before existing data".
233 - <key> is the key under which the client asks to store the data
237 when the item is retrieved. Clients may use this as a bit field to
238 store data-specific information; this field is opaque to the server.
240 of 16, but you might want to restrict yourself to 16 bits for
244 (although it may be deleted from the cache to make place for other
246 current time), it is guaranteed that clients will not be able to
251 - <bytes> is the number of bytes in the data block to follow, *not*
259 - "noreply" optional parameter instructs the server to not send the
262 to the client, and not reading it on the client side will break
275 - "STORED\r\n", to indicate success.
277 - "NOT_STORED\r\n" to indicate the data was not stored, but not
281 - "EXISTS\r\n" to indicate that the item you are trying to store with
284 - "NOT_FOUND\r\n" to indicate that the item you are trying to store
304 to indicate the end of response.
315 - <bytes> is the length of the data block to follow, *not* including
326 but deleted to make space for more items, or expired, or explicitly
337 - <key> is the key of the item the client wishes the server to delete
339 - "noreply" optional parameter instructs the server to not send the
343 The response line to this command can be one of:
345 - "DELETED\r\n" to indicate success
347 - "NOT_FOUND\r\n" to indicate that the item with this key was not
357 Commands "incr" and "decr" are used to change data for some item
360 the current data value does not conform to such a representation, the
362 bogus value as if it were 0, leading to confusion). Also, the item
363 must already exist for incr/decr to work; these commands won't pretend
374 - <key> is the key of the item the client wishes to change
376 - <value> is the amount by which the client wants to increase/decrease
379 - "noreply" optional parameter instructs the server to not send the
385 - "NOT_FOUND\r\n" to indicate the item with this value was not found
391 to decrease the value below 0, the new value will be 0. Overflow in
395 guaranteed to decrement its returned length. The number MAY be
402 The "touch" command is used to update the expiration time of an existing item
407 - <key> is the key of the item the client wishes the server to touch
411 item were to expire in 10 seconds, but then was touched with an
414 - "noreply" optional parameter instructs the server to not send the
418 The response line to this command can be one of:
420 - "TOUCHED\r\n" to indicate success
422 - "NOT_FOUND\r\n" to indicate that the item with this key was not
428 The "gat" and "gats" commands are used to fetch items and update the
444 to indicate the end of response.
455 - <bytes> is the length of the data block to follow, *not* including
508 After this command, the client expects an item to be returned, received as a
514 but deleted to make space for more items, or expired, or explicitly
528 optional, requiring the 'v' flag to be supplied.
562 These extra flags can be added to the response:
571 This flag instructs memcached to run a base64 decoder on <key> before looking
573 are sent to memcached in base64 encoding.
576 signals to the client that the key is base64 encoded binary.
587 The O(opaque) token is used by this and other commands to allow easier
590 response belongs to which without also retrieving the key. If the key is very
593 and "3", to match up responses to the request.
595 Opaque tokens may be up to 32 bytes in length, and are a string similar to
600 Noreply is a method of reducing the amount of data sent back by memcached to
605 With noreply enabled, the "EN\r\n" marker is suppressed. This allows you to
613 It is possible to access an item without causing it to be "bumped" to the head
619 The data block for a metaget response is optional, requiring this flag to be
620 passed in. The response code also changes from "HD" to "VA <size>"
628 external system to version cache data (row versions, clocks, etc).
632 Used to help with so called "dog piling" problems with recaching of popular
635 created a 'W' flag is added to the response to indicate to a client that they
636 have "won" the right to recache an item.
640 Further requests will see a 'Z' flag to indicate that another client has
643 Can be combined with CAS flags to gate the update further.
647 Similar to and can be combined with 'N'. If the remaining TTL of an item is
648 below the supplied token, return a 'W' flag to indicate the client has "won"
649 the right to recache an item. This allows refreshing an item before it leads to
654 Similar to "touch" and "gat" commands, updates the remaining TTL of an item if
657 These extra flags can be added to the response:
661 ownership of a cache item. This allows a single client to be atomically
671 Items can be marked as stale by the metadelete command. This indicates to the
672 client that an object needs to be updated, and that it should make a decision
673 o if potentially stale data is safe to use.
675 This is used when you want to convince clients to recache an item, but it's
676 safe to use pre-existing data while the recache happens.
681 flag indicates to a client that a different client is responsible for
683 may decide to retry later or take some other action.
688 The meta set command a generic command for storing data to memcached. Based
707 is assumed to be 0 length.
716 - "HD" (STORED), to indicate success.
718 - "NS" (NOT_STORED), to indicate the data was not stored, but not
721 - "EX" (EXISTS), to indicate that the item you are trying to store with
724 - "NF" (NOT_FOUND), to indicate that the item you are trying to store
733 - F(token): set client flags to token (32 bit unsigned numeric)
734 - I: invalidate. set-to-invalid if supplied CAS is older than item's CAS
740 - M(token): mode switch to change behavior to add, replace, append, prepend
751 Similar to the basic "cas" command, only store item if the supplied token
756 - F(token): set client flags to token (32 bit unsigned numeric)
758 Sets flags to 0 if not supplied.
760 - I: invalid. set-to-invalid if CAS is older than it should be.
770 Noreply is a method of reducing the amount of data sent back by memcached to
781 A: "append" command. If item exists, append the new value to its data.
782 P: "prepend" command. If item exists, prepend the new value to its data.
794 TTL from N instead of T to be consistent with the usage of N in other
801 marking items as "stale" to allow serving items as stale during revalidation.
816 - "HD" (DELETED), to indicate success
818 - "NF" (NOT_FOUND), to indicate that the item with this key was not found.
820 - "EX" (EXISTS), to indicate that the supplied CAS token does not match the
830 - O(token): opaque to copy back.
839 Can be used to only delete or mark-stale if a supplied CAS value matches.
845 be supplied an 'X' flag to show the data is stale and needs to be recached.
847 - O(token): opaque to copy back.
858 When marking an item as stale with 'I', the 'T' flag can be used to update the
860 waiting to be recached.
889 - "HD" to indicate success
891 - "NF" (NOT_FOUND), to indicate that the item with this key was not found.
893 - "NS" (NOT_STORED), to indicate that the item was not created as requested
896 - "EX" (EXISTS), to indicate that the supplied CAS token does not match the
910 - J(token): initial value to use if auto created after miss (default 0)
911 - D(token): delta to apply (decimal unsigned 64-bit number, default 1)
913 - M(token): mode switch to change between incr and decr modes.
925 Can be used to only incr/decr if a supplied CAS value matches. A new CAS value
926 is generated after a delta is applied. Add the 'c' flag to get the new CAS
931 Similar to mget, on a miss automatically create the item. A value can be
939 - D(token): delta to apply
941 An unsigned integer to either add or subtract from the currently stored
946 On success, sets the remaining TTL to the supplied value.
958 The meta no-op command exists solely to return a static response code. It
970 "mn\r\n" command can be tagged to the end of the chain, which will return an
971 "MN\r\n", signalling to a client that all previous commands have been
977 NOTE: This command is subject to change as of this writing.
979 The slabs reassign command is used to redistribute memory once a running
980 instance has hit its limit. It might be desirable to have memory laid out
985 - <source class> is an id number for the slab class to steal a page from
989 - <dest class> is an id number for the slab class to move a page to
993 - "OK" to indicate the page has been scheduled to move
995 - "BUSY [message]" to indicate a page is already being processed, try again
1002 - "NOTFULL [message]" dest class must be full to move new pages to it
1011 NOTE: This command is subject to change as of this writing.
1014 own when to move memory between slab classes. Its implementation and options
1022 - 0|1|2 is the indicator on whether to enable the slabs automover or not.
1026 - <0> means to set the thread on standby
1028 - <1> means to return pages to a global pool when there are more than 2 pages
1032 - <2> is a highly aggressive mode which causes pages to be moved every time
1033 there is an eviction. It is not recommended to run for very long in this
1040 made to have sane defaults however you are able to tune while the daemon is
1052 10% of COLD_LRU. WARM_LRU is up to 25% of cache, or tail is idle longer
1057 time. If switching from segmented to flat mode, the background thread will
1067 - "OK" to indicate a successful update of the settings.
1069 - "ERROR [message]" to indicate a failure or improper arguments.
1074 NOTE: This command (and related commands) are subject to change as of this
1089 - "OK" to indicate the crawler has been started or stopped.
1095 - The number of microseconds to sleep in between each item checked for
1107 - The maximum number of items to inspect in a slab class per run request. This
1108 allows you to avoid scanning all of very large slabs when it is unlikely to
1109 find items to expire.
1120 the crawler to start at the tail of each of these classids and run to the
1124 The special keyword "all" instructs it to crawl all slabs with items in
1129 - "OK" to indicate successful launch.
1131 - "BUSY [message]" to indicate the crawler is already processing a request.
1133 - "BADCLASS [message]" to indicate an invalid class was specified.
1137 - Similar in function to the above "lru_crawler crawl" command, this function
1139 Similar to "cachedump", but does not lock the cache and can return all
1145 cause frequently accessed items to be missed.
1150 The exact keys available are subject to change, but will include at least:
1157 - "OK" to indicate successful launch.
1159 - "BUSY [message]" to indicate the crawler is already processing a request.
1161 - "BADCLASS [message]" to indicate an invalid class was specified.
1165 - Similar in function to the above "lru_crawler crawl" command, this function
1171 cause frequently accessed items to be missed.
1176 commands against the server to fetch exactly what they want to know.
1180 - "OK" to indicate successful launch.
1182 - "BUSY [message]" to indicate the crawler is already processing a request.
1184 - "BADCLASS [message]" to indicate an invalid class was specified.
1191 Watchers are a way to connect to memcached and inspect what's going on
1208 space-separated. Logs will be sent to the watcher until it disconnects.
1212 - "OK" to indicate the watcher is ready to send logs.
1219 printed out of order. If this is important the GID may be used to put log
1223 keys used conform to standard ASCII, this should have no effect. For keys with
1224 less standard or binary characters, "%NN"'s are inserted to represent the
1247 returned to a client while in proxy mode. The conditions which logs are
1261 The command "stats" is used to query the server about statistics it
1267 it causes the server to output general-purpose statistics and
1274 of the protocol, and are subject to change for the convenience of
1292 response to the "stats" command, together with the type of the value
1304 | time | 32u | current UNIX time according to the server |
1316 | | | to store items |
1367 | | | caused by attempting to write a value |
1375 | idle_kicks | 64u | Number of connections closed due to |
1378 | | | to free memory for new items |
1384 | | | to network |
1385 | limit_maxbytes | size_t | Number of bytes this server is allowed to |
1394 | conn_yields | 64u | Number of times any connection yielded to |
1395 | | | another due to hitting the -R limit. |
1399 | | | grown to a new size |
1406 | | | recently but did not jump to top of LRU |
1412 | | | Items can be evicted to avoid OOM errors. |
1413 | moves_to_cold | 64u | Items moved from HOT/WARM to COLD LRU's |
1414 | moves_to_warm | 64u | Items moved from COLD to WARM LRU |
1416 | direct_reclaims | 64u | Times worker threads had to directly |
1421 | slab_global_page_pool | 32u | Slab pages returned to global pool for |
1422 | | | reassignment to other slab classes. |
1426 | | | (due to no free memory in slab) |
1433 | | | freelist when it wasn't expecting to. |
1440 | log_worker_dropped | 64u | Logs a worker never wrote due to full buf |
1441 | log_worker_written | 64u | Logs written by a worker, to be picked up |
1442 | log_watcher_skipped | 64u | Logs not sent to slow watchers. |
1443 | log_watcher_sent | 64u | Logs written to watchers. |
1448 | | | resulting in fallback to round robin |
1454 CAVEAT: This section describes statistics which are subject to change in the
1461 Note that these are not guaranteed to return in any specific order and
1476 | domain_socket | string | Path to the domain socket (if any). |
1500 | lru_crawler_sleep | 32 | Microseconds to sleep between LRU crawls |
1502 | | 32u | Max items to crawl per slab per run |
1507 | hot_max_factor | float | Set idle age of HOT LRU to COLD age * this |
1508 | warm_max_factor | float | Set idle age of WARM LRU to COLD age * this |
1527 | bool | If proxy is configured to use IO_URING. |
1536 CAVEAT: This section describes statistics which are subject to change in the
1565 mem_requested Number of bytes requested to be stored in this LRU[*]
1566 evicted Number of times an item had to be evicted from the LRU
1569 time set had to be evicted from the LRU before it
1572 evicted from this class. Use this to judge how
1574 outofmemory Number of times the underlying slab class was unable to
1579 report your situation to the developers.
1587 recently touched but were evicted before being moved to
1590 lrutail_reflocked Number of items found to be refcount locked in the
1593 moves_to_warm Number of items moved from COLD to WARM.
1596 direct_reclaims Number of times worker threads had to directly pull LRU
1597 tails to find memory for a new item.
1601 hits_to_temp Number of get_hits to each sub-LRU.
1615 CAVEAT: This section describes statistics which are subject to change in the
1620 WARNING: In versions prior to 1.4.27 this command causes the cache server to
1636 for every 32 bytes. You can use this to determine if adjusting the slab growth
1638 lower range could allow items to fit more snugly into their slab classes, if
1654 NOTE: From 1.4.27 to 1.6.24 this feature could be enabled or disabled at
1656 ability was not thread safe and could crash the server. While possible to fix,
1657 it would make the feature too slow to be usable.
1662 If you want to make a histogram of item sizes for a memcached instance that is
1668 CAVEAT: This section describes statistics which are subject to change in the
1688 | | default is less than or equal to one megabyte in size. |
1690 | total_pages | Total number of pages allocated to the slab class. |
1691 | total_chunks | Total number of chunks allocated to the slab class. |
1698 | cas_badval | Total number of CAS commands that failed to modify a |
1699 | | value due to a bad CAS id. |
1701 | used_chunks | How many chunks have been allocated to items. |
1702 | free_chunks | Chunks not yet allocated to items, or freed via delete. |
1706 | total_malloced | Total amount of memory allocated to slab pages. |
1749 | conn_mwrite | Writing a complex response, e.g., to a "get" command. |
1750 | conn_new_cmd | Connection is being prepared to accept a new command. |
1759 | | waiting for the rest of it to arrive (note the difference |
1798 is given as the last parameter). Its effect is to invalidate all
1801 response to a retrieval command (unless it's stored again under the
1807 was set to be executed to be ignored for retrieval purposes.
1810 have a pool of memcached servers, and you need to flush all content,
1813 clients suddenly needing to recreate content that would otherwise
1816 The delay option allows you to have them reset in e.g. 10 second
1817 intervals (by passing 0 to the first, 10 to the second, 20 to the
1825 be released back to the OS asynchronously.
1830 "shutdown" is a command with an optional argument used to stop memcached with
1832 may be specified as the single argument to instead trigger a graceful shutdown
1847 as the last parameter). Its effect is to set the verbosity level of
1868 This command causes the worker thread to attempt a) opening a new socket, and
1880 delivery, so should only be used for operations that aren't required to
1889 requests, both of which are more suitable to TCP transport for reliability
1902 is free to use whatever request IDs it likes. The server's response will
1904 to differentiate between responses to outstanding requests if there are
1906 ID are probably delayed responses to an earlier request and should be
1909 The sequence number ranges from 0 to n-1, where n is the total number of