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
Copy file name to clipboardExpand all lines: src/guide/ssr.md
+2-7Lines changed: 2 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -287,16 +287,11 @@ var createRenderer = require('vue-server-renderer').createRenderer
287
287
var lru =require('lru-cache')
288
288
289
289
var renderer =createRenderer({
290
-
cache:lru({
291
-
max:10000000,
292
-
length:function (n, key) {
293
-
returnn.length
294
-
}
295
-
})
290
+
cache:lru(1000)
296
291
})
297
292
```
298
293
299
-
That will cache up to 10 million characters of HTML (10MB assuming 1 byte per character). See [the lru-cache options](https://github.com/isaacs/node-lru-cache#options) for other configurations.
294
+
That will cache up to 1000 unique renders. For other configurations that more closely align to memory usage, see [the lru-cache options](https://github.com/isaacs/node-lru-cache#options).
300
295
301
296
Then for components you want to cache, you must provide them with:
0 commit comments