interface cache {
    // A resource for caching data with optional expiration.
    resource cache {
        // Retrieves a value from the cache by key.
        // Returns None if the key does not exist or has expired.
        get: static func(key: string) -> option<list<u8>>;
        // Sets a value in the cache with the specified key.
        // Optional ttl-ms parameter sets the time-to-live in milliseconds after which the value expires.
        // If ttl-ms is None, the value will not expire automatically.
        set: static func(key: string, value: list<u8>, ttl-ms: option<u64>);
    }
}
