Type Alias: KeyPath
ts
type KeyPath = string | string[];
KeyPath
is a type that represents a key path in a key-value pair.
It can be a string or an array of strings.
Example
ts
const cache = new HybridWebCache();
const keyPath: KeyPath = "user.name";
const keyPathArray: KeyPath = ["wife", "name"];
await cache.set(keyPath, "John Doe");
await cache.set(keyPathArray, "Jane Doe");