# kv.entry.head

Checks whether a key-value entry exists, without reading its value

# kv.entry.head

```
kv.entry.head --key TEXT [--durable] → entry
```

Checks whether a key-value entry exists, without reading its value. Check whether the entry `--key` exists and is still live in the project's key-value store (`--durable` for the disk-backed one), without reading its value. Adds `entry: { key, exists }` and keeps the rest of the payload — branch on `input.entry.exists` with [`logic.if`](/nodes/logic/logic.if.md).

## Flags

- `--key` (required): The entry to check. Usually a {{ }} expression.
- `--durable`: Use the disk-backed store, which survives a restart. Default: the in-memory one.

## Examples

### Skip work that is already cached

```
| kv.entry.head --key "profile:{{ $trigger.params.id }}"
```

Then `logic.if --when "input.entry.exists"`.

It answers:

```json
{
  "entry": {
    "key": "profile:7",
    "exists": false
  }
}
```
