Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions databases/index.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Supported Databases
description: All 42 engines TablePro connects to, their default ports, and which ones need a plugin
description: All 43 engines TablePro connects to, their default ports, and which ones need a plugin
---

import DriverCounts from "/snippets/driver-counts.mdx";

Forty-two engines, and every one of them is free to use. What differs between them is where the
Forty-three engines, and every one of them is free to use. What differs between them is where the
driver comes from, not what the license covers.

<DriverCounts />
Expand Down Expand Up @@ -35,6 +35,7 @@ driver comes from, not what the license covers.
| [libSQL](/databases/libsql) | API-based | Plugin |
| [Kafka](/databases/kafka) | 9092 | Plugin |
| [MariaDB](/databases/mariadb) | 3306 | Built-in |
| [Memcached](/databases/memcached) | 11211 | Plugin |
| [Microsoft SQL Server](/databases/mssql) | 1433 | Plugin |
| [MongoDB](/databases/mongodb) | 27017 | Plugin |
| [MySQL](/databases/mysql) | 3306 | Built-in |
Expand Down
86 changes: 86 additions & 0 deletions databases/memcached.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
title: Memcached
description: Browse Memcached keys with their values and TTLs, edit them in the grid, and run text protocol commands
---

import RegistryPlugin from "/snippets/registry-plugin.mdx";

Memcached 1.4 and later work over the text protocol on port 11211.

<RegistryPlugin name="Memcached" plugin="Memcached Driver" />

## Quick setup

Create a connection, select **Memcached**, enter host and port, then click **Save & Connect**. Memcached has no databases, so there is no Database field.

## Connection settings

| Field | Description |
|-------|-------------|
| **Host** | Memcached server hostname or IP. `localhost` by default |
| **Port** | `11211` by default |
| **Username / Password** | A user from the server's auth file. Leave both empty on a server without one |

SSL and SSH tunnels work as on other connections. TLS needs a server built with TLS and started with `-Z`.

## Authentication

Fill in **Username** and **Password** for a server started with `-Y <auth file>`, the text protocol's login in Memcached 1.5.15 and later. Without them such a server answers every command with `CLIENT_ERROR unauthenticated`, and the connection fails with "This Memcached server requires a username and password".

SASL is not supported. It needs the binary protocol, which Memcached has deprecated.

## Connection URL

```text
memcached://127.0.0.1:11211
```

## Browsing keys

The sidebar shows one table, **keys**, with the item count from `stats`. The grid gives one row per key: **Key**, **Value**, **TTL** and **Flags**. TTL is the seconds left, and empty for an item that never expires.

The text protocol has no command that lists keys, so the list comes from one of two places:

| Server | Listing |
|--------|---------|
| 1.4.31 and later, with the LRU crawler on (the default) | `lru_crawler metadump all`. Every key |
| Older, or started with `-o no_lru_crawler` | `stats cachedump` per slab class. A sample: the server caps each slab's reply, so keys can be missing |

The table's comment says which one the connection uses. Neither is a snapshot: the server walks its LRU lists while it keeps moving items between them, so a key changed during the walk can be missing until the next refresh. A listing stops at 1,000,000 keys. Sorting is by key, and filters apply to **Key** only: `=`, `!=`, contains, starts with, ends with, `IN`, `NOT IN` and regex. Values are read with `get` for the rows on the current page.

## Editing

Saving edits generates commands:

| Change | Command |
|--------|---------|
| **Value** or **Flags** | `set`, keeping the current TTL |
| **TTL** alone | `touch`. Empty or `0` keeps the item until it is evicted |
| New row | `set` with the row's key, value, TTL and flags |
| Deleted row | `delete` |

A TTL over 30 days is sent as the time it ends, because Memcached reads a larger exptime as a Unix time. **Key** cannot be edited: add a row with the new key and delete the old one. Truncating the table runs `flush_all`, which empties the whole server.

## Command editor

The editor takes text protocol commands with the value as the last argument instead of a data block. Quote a value that holds spaces. Inside double quotes, `\n`, `\r`, `\t`, `\xHH`, `\"` and `\\` are escapes; single quotes take everything as written.

```bash
get user:1 user:2
set user:1 0 300 "Ada Lovelace"
append user:1 0 0 " (1815)"
cas user:1 0 300 42 "new value"
touch user:1 600
incr page:hits 1
delete user:1
stats items
lru_crawler metadump all
```

The whole vocabulary is `get`, `gets`, `gat`, `gats`, `set`, `add`, `replace`, `append`, `prepend`, `cas`, `touch`, `delete`, `incr`, `decr`, `flush_all`, `stats`, `version` and `lru_crawler metadump`. Anything else comes back as "Unsupported Memcached command" without reaching the server. Storage commands take `<key> <flags> <exptime> <value>`, the order of the text protocol.

Safe Mode reads `get`, `gets`, `version`, `stats` and `lru_crawler metadump` as reads, `delete` and `flush_all` as destructive, and everything else, `stats reset` included, as a write.

## Server Dashboard

The Server Dashboard shows used memory against `limit_maxbytes`, items, hit ratio, evictions, connections and uptime, all from `stats`.
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
"databases/kingbasees",
"databases/libsql",
"databases/mariadb",
"databases/memcached",
"databases/mssql",
"databases/mongodb",
"databases/mysql",
Expand Down
2 changes: 1 addition & 1 deletion index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Introduction
description: Native macOS database client for MySQL, PostgreSQL, SQLite, MongoDB, Redis, and 37 more
description: Native macOS database client for MySQL, PostgreSQL, SQLite, MongoDB, Redis, and 38 more
---

import DriverCounts from "/snippets/driver-counts.mdx";
Expand Down
4 changes: 2 additions & 2 deletions snippets/driver-counts.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Five drivers ship inside the app and cover twelve databases. Twenty-six registry plugins cover the
other thirty and install on the first connection that needs one. See
Five drivers ship inside the app and cover twelve databases. Twenty-seven registry plugins cover the
other thirty-one and install on the first connection that needs one. See
[Plugins](/features/plugins).
Loading