Get¶
Retrieves a cached value by its key, if it exists.
1 | |
Parameters¶
string key
The key of the value to retrieve.
Returns¶
The cached value if found; otherwise, null.
Remarks¶
The key name can include a ":" qualifier if needed. Script keys are internally prefixed with Scripting:, isolating this surface from callers that use the underlying cache directly.
Values are JSON-serialized. Objects and arrays are returned as fresh script objects; recognized date-time strings are returned as DateTimeOffset values.
Examples¶
Read a value from the cache or load it¶
1 2 3 4 5 6 7 8 9 10 11 12 | |