get method

Gets an item from the cache by key. If key is not found, then null is returned as data.

If the client library key is set to enforce session, an active user session is required (e.g., user needs to be logged in) to call this method.

key The key to retrieve

Implementation

FutureApiResponse get(String key) => FutureApiResponse._(_fetcher
    .get<Map<String, dynamic>>('/_api/rest/v1/cache?key=$key')
    .then((value) =>
        APIResponse(errors: value.errors, data: value.data?['value'])));