TryGet
TryGet retrieves a value from the cache by key. A result object is always returned; no exception is raised if the key is not found.
Properties
Section titled “Properties”The key of the entry to retrieve.
Accepts string literals, expressions, or references to string values.
Output
Section titled “Output”Returns an object with the following properties:
| Property | Type | Description |
|---|---|---|
WasFound | Boolean | true if the key exists in the cache, false otherwise. |
Value | Matches the Value type set on the Cache service | The cached value when WasFound is true. Returns null when WasFound is false. |
Example output when the key exists:
{ "WasFound": True, "Value": "MyValue"}Example output when the key does not exist:
{ "WasFound": False, "Value": <NULL>}