Remove-ZrItem
Deletes a single item from the connected Clustron Zaris store. A missing key is treated as a successful no-op, not an error.
Syntax
Remove-ZrItem [-Key] <string> [-ConnectionString <string>] [-StoreName <string>] [-Endpoints <string[]>] [-TimeoutSec <int>]
Description
Remove-ZrItem removes the item stored under -Key from the connected Zaris store by issuing a single DeleteAsync call. The delete is idempotent: the result reports Success = true with Deleted = true whether or not the key was present, rather than raising an error for a missing key. The result also carries the operation's Revision and Version.
The command operates against the active Connect-ZrStore session. Alternatively, supply -StoreName and -Endpoints to open a one-shot independent connection for this call only; the two connection modes cannot be combined.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
-Key | String | Yes | Key identifying the item to delete. Positional (position 0). Must not be null or empty. |
-ConnectionString | String | No | Connect via a Zaris connection string, e.g. zaris://host:7861/store; an alternative to -StoreName + -Endpoints for a one-shot connection. Ignored when a Connect-ZrStore session is active. |
-StoreName | String | No | Store to target when using an independent (one-shot) connection instead of the active session. Requires -Endpoints. |
-Endpoints | String[] | No | One or more node endpoints (host:port) for an independent connection. Ignored when a Connect-ZrStore session is active. |
-TimeoutSec | Int32 | No | Connection timeout in seconds (1–120) for an independent connection. Default 5. |
Examples
Delete a session item from the connected store:
Remove-ZrItem -Key "session:user123"
Delete a cache entry using the positional key:
Remove-ZrItem "cache:product:100"
Delete an item over a one-shot independent connection:
Remove-ZrItem -Key "session:abc" -ConnectionString "zaris://10.0.0.5:7861/web"