Skip to content

Commit b34a408

Browse files
author
Sébastien Chopin
authored
Update README.md
1 parent dcadb27 commit b34a408

1 file changed

Lines changed: 1 addition & 28 deletions

File tree

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
11
# Cached Components
22

3-
> Nuxt.js use [lru-cache](https://github.com/isaacs/node-lru-cache) to allows cached components for better render performances
4-
5-
## Usage
6-
7-
Use the `cache` key in your `nuxt.config.js`:
8-
```js
9-
module.exports = {
10-
cache: true
11-
}
12-
```
13-
14-
`cache` can be a Boolean or an Object, if an object, you can use theses keys:
15-
16-
| key | Optional? | Type | Default | definition |
17-
|------|------------|-----|---------|------------|
18-
| `max` | Optional | Integer | 1000 | The maximum size of the cached components, when the 1001 is added, the first one added will be removed from the cache to let space for the new one. |
19-
| `maxAge` | Optional | Integer | 900000 | Maximum age in ms, default to 15 minutes. |
20-
21-
Other options: https://github.com/isaacs/node-lru-cache#options
22-
23-
## Demo
24-
25-
```bash
26-
npm install
27-
npm start
28-
```
29-
30-
Go to [http://localhost:3000](http://localhost:3000)
3+
https://nuxtjs.org/examples/cached-components

0 commit comments

Comments
 (0)