You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Setting the compress option to true will enable a default configuration
169
+
// for best speed using gzip. For advanced use, a configuration object may
170
+
// also be passed with implementation-specific parameters. Currently, only
171
+
// the built-in zlib/gzip implementation is supported.
172
+
var zlib =require('zlib');
173
+
var redisCache =cacheManager.caching({
174
+
store: redisStore,
175
+
host:'localhost', // default value
176
+
port:6379, // default value
177
+
auth_pass:'XXXXX',
178
+
db:0,
179
+
ttl:600,
180
+
compress: {
181
+
type:'gzip',
182
+
params: {
183
+
level:zlib.Z_BEST_COMPRESSION
184
+
}
185
+
}
186
+
});
187
+
```
188
+
Currently, all implementation-specific configuration parameters are passed directly to the `zlib.gzip` and `zlib.gunzip` methods. Please see the [Node Zlib documentation](https://nodejs.org/dist/latest-v6.x/docs/api/zlib.html#zlib_class_options) for available options.
0 commit comments