@@ -16,7 +16,7 @@ In addition to providing header manipulation, the plugin also decorates the
16
16
server instance with an object that can be used for caching items. ** Note:**
17
17
the default cache should not be used in a "production" environment. It is
18
18
an LRU, in-memory cache that is capped at 100,000 items. It is * highly*
19
- recommended that a full featured cache object be supplied, e.g.
19
+ recommended that a full- featured cache object be supplied, e.g.
20
20
[ abstract-cache-redis] [ acache-redis ] .
21
21
22
22
[ acache-redis ] : https://www.npmjs.com/package/abstract-cache-redis
@@ -42,7 +42,7 @@ See [Fastify's LTS policy](https://github.com/fastify/fastify/blob/main/docs/Ref
42
42
43
43
## Example
44
44
45
- This example shows using the plugin to disable client side caching of all
45
+ This example shows using the plugin to disable client- side caching of all
46
46
routes.
47
47
48
48
``` js
@@ -123,7 +123,7 @@ for a *cache-response-directive* as defined by RFC 2616.
123
123
resource may be cached. When this is set, and ` privacy ` is not set to ` no-cache ` ,
124
124
then ` ', max-age=<value>' ` will be appended to the ` cache-control ` header.
125
125
+ ` cache ` (Default: ` abstract-cache.memclient ` ): an [ abstract-cache] [ acache ]
126
- protocol compliant cache object. Note: the plugin requires a cache instance to
126
+ protocol- compliant cache object. Note: the plugin requires a cache instance to
127
127
properly support the ETag mechanism. Therefore, if a falsy value is supplied
128
128
the default will be used.
129
129
+ ` cacheSegment ` (Default: ` '@fastify/caching' ` ): segment identifier to use when
@@ -144,7 +144,7 @@ recommended to always supply a value to this method to avoid this operation.
144
144
All incoming requests to paths affected by this plugin will be inspected for
145
145
the ` if-none-match ` header. If the header is present, the value will be used
146
146
to lookup the tag within the cache associated with this plugin. If the tag is
147
- found, then the response will be ended with a 304 status code sent to
147
+ found, then the response will end with a 304 status code sent to
148
148
the client.
149
149
150
150
Tags will be cached according to the second parameter. If the second parameter
@@ -158,7 +158,7 @@ milliseconds. The default lifetime, when the parameter is not specified, is
158
158
### ` reply.expires(date) `
159
159
160
160
This method allows setting of the ` expires ` header. It accepts a regular ` Date `
161
- object, or a string that is a valid date string according to
161
+ object or a string that is a valid date string according to
162
162
[ RFC 2616 §14.21] [ sec14.21 ] .
163
163
164
164
[ sec14.21 ] : https://tools.ietf.org/html/rfc2616#section-14.21
0 commit comments