From 47d8a5acf903c7c7842300e650748cbc622bec62 Mon Sep 17 00:00:00 2001 From: Paulo Vieira Date: Thu, 16 Jun 2016 01:21:42 +0100 Subject: [PATCH 1/2] API docs - give some details about the the 'cache' configuration and what happens with catbox --- API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 51b5c9a61..5fbb05bd8 100755 --- a/API.md +++ b/API.md @@ -101,11 +101,11 @@ Creates a new `Server` object where: includes a default cache for storing application state. By default, a simple memory-based cache is created which has limited capacity and capabilities. **hapi** uses [**catbox**](https://github.com/hapijs/catbox) for its cache which includes support for - common storage solutions (e.g. Redis, MongoDB, Memcached, and Riak). Caching is only utilized + common storage solutions (e.g. Redis, MongoDB, Memcached, Riak, among others). Caching is only utilized if methods and [plugins](#plugins) explicitly store their state in the cache. The server cache configuration only defines the storage container itself. `cache` can be assigned: - a prototype function (usually obtained by calling `require()` on a **catbox** strategy - such as `require('catbox-redis')`). + such as `require('catbox-redis')`). A new **catbox** [client](https://github.com/hapijs/catbox#client) will be created internally using this function. - a configuration object with the following options: - `engine` - a prototype function or **catbox** engine object. - `name` - an identifier used later when provisioning or configuring caching for From 81b06a56aae974aaf86edc1dbb3f3555bc9f4f37 Mon Sep 17 00:00:00 2001 From: Paulo Vieira Date: Mon, 20 Jun 2016 13:19:24 +0100 Subject: [PATCH 2/2] add request.generateResponse to the API toc --- API.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API.md b/API.md index 5fbb05bd8..bddd34d6c 100755 --- a/API.md +++ b/API.md @@ -66,6 +66,7 @@ - [Request properties](#request-properties) - [`request.setUrl(url, [stripTrailingSlash])`](#requestseturlurl-stripTrailingSlash) - [`request.setMethod(method)`](#requestsetmethodmethod) + - [`request.generateResponse(source, [options])`](#requestgenerateresponsesource-options) - [`request.log(tags, [data, [timestamp]])`](#requestlogtags-data-timestamp) - [`request.getLog([tags], [internal])`](#requestgetlogtags-internal) - [`request.tail([name])`](#requesttailname)