Skip to content

Commit cea8866

Browse files
committed
documentation update
1 parent f7f841e commit cea8866

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Lambda API was written to be extremely lightweight and built specifically for se
5252
- [REQUEST](#request)
5353
- [RESPONSE](#response)
5454
- [attachment()](#attachmentfilename)
55-
- [cache()](#cacheageprivate)
55+
- [cache()](#cacheage--private)
5656
- [clearCookie()](#clearcookiename-options)
5757
- [cookie()](#cookiename-value-options)
5858
- [cors()](#corsoptions)
@@ -381,7 +381,7 @@ Returns a boolean indicating the existence of `key` in the response headers. `ke
381381
### removeHeader(key)
382382
Removes header matching `key` from the response headers. `key` is case insensitive. This method is chainable.
383383

384-
### getLink(s3Path[,expires][,callback])
384+
### getLink(s3Path [,expires] [,callback])
385385
This returns a signed URL to the referenced file in S3 (using the `s3://{my-bucket}/{path-to-file}` format). You can optionally pass in an integer as the second parameter that will changed the default expiration time of the link. The expiration time is in seconds and defaults to `900`. In order to ensure proper URL signing, the `getLink()` must be asynchronous, and therefore returns a promise. You must either `await` the result or use a `.then` to retrieve the value.
386386

387387
There is an optional third parameter that takes an error handler callback. If the underlying `getSignedUrl()` call fails, the error will be returned using the standard `res.error()` method. You can override this by providing your own callback.
@@ -576,7 +576,7 @@ res.clearCookie('fooArray', { path: '/', httpOnly: true }).send()
576576
### etag([boolean])
577577
Enables Etag generation for the response if at value of `true` is passed in. Lambda API will generate an Etag based on the body of the response and return the appropriate header. If the request contains an `If-No-Match` header that matches the generated Etag, a `304 Not Modified` response will be returned with a blank body.
578578

579-
### cache([age][,private])
579+
### cache([age] [,private])
580580
Adds `cache-control` header to responses. If the first parameter is an `integer`, it will add a `max-age` to the header. The number should be in milliseconds. If the first parameter is `true`, it will add the cache headers with `max-age` set to `0` and use the current time for the `expires` header. If set to false, it will add a cache header with `no-cache, no-store, must-revalidate` as the value. You can also provide a custom string that will manually set the value of the `cache-control` header. And optional second argument takes a `boolean` and will set the `cache-control` to `private` This method is chainable.
581581

582582
```javascript

0 commit comments

Comments
 (0)